Successful ssh login (HPUX 11iv2)

Microsoft.ACS.HPUX.11iv2.Ssh.Succeeded (Rule)

Rule to collect events for successful ssh login

Knowledge Base article:

Summary

An ssh command has been detected in the system log files.

Causes

User was granted access to the system remotely. This monitor allows system administrators to track 'ssh' usage.

Resolutions

The description of the alert and/or the output data item contains information on the event encountered. If the activity appears suspicious, please check the associated event details and any other events that happened around the time of this event.

Element properties:

TargetMicrosoft.ACS.HPUX.11iv2.ACSEndPoint
CategoryEventCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
EventDS DataSource Microsoft.Unix.SCXLog.Privileged.Datasource Default
WA WriteAction Microsoft.ACS.Unix.SecureEventLogWriter Default

Source Code:

<Rule ID="Microsoft.ACS.HPUX.11iv2.Ssh.Succeeded" Enabled="true" Target="Microsoft.ACS.HPUX.11iv2.ACSEndPoint" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Privileged.Datasource">
<Host>$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</Host>
<LogFile>/var/adm/syslog/syslog.log</LogFile>
<!-- [TYPE] HP SSH True -->
<!-- [INPUT] Nov 6 11:41:04 scxhpi10 sshd[26629]: Accepted keyboard-interactive/pam for root from 10.195.172.49 port 52266 ssh2 -->
<!-- [INPUT] Nov 6 11:39:20 scxhpi10 sshd[26526]: Accepted publickey for jonas from 10.195.172.49 port 52262 ssh2 -->
<!-- [INPUT] Nov 6 14:11:03 scxhpr3 sshd[21094]: Accepted keyboard-interactive/pam for jonas from 10.195.172.83 port 64853 ssh2 -->
<!-- [INPUT] Nov 6 14:11:23 scxhpr3 sshd[21113]: Accepted publickey for jonas from 10.195.172.83 port 64854 ssh2 -->
<!-- [EXPECTED] date="Nov 6 11:41:04"; hostname="scxhpi10"; process="sshd"; processId="26629"; user="root"; clientHost="10.195.172.49" -->
<!-- [EXPECTED] date="Nov 6 11:39:20"; hostname="scxhpi10"; process="sshd"; processId="26526"; user="jonas"; clientHost="10.195.172.49" -->
<!-- [EXPECTED] date="Nov 6 14:11:03"; hostname="scxhpr3"; process="sshd"; processId="21094"; user="jonas"; clientHost="10.195.172.83" -->
<!-- [EXPECTED] date="Nov 6 14:11:23"; hostname="scxhpr3"; process="sshd"; processId="21113"; user="jonas"; clientHost="10.195.172.83" -->
<RegExpFilter>sshd[[:space:]]*\[[[:digit:]]+\][[:space:]]*:[[:space:]]*Accepted [^[:space:]]+ for[[:space:]]+[^[:space:]]+[[:space:]]+from[[:space:]]+[^[:space:]]+[[:space:]]+</RegExpFilter>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="ACS.Unix!Microsoft.ACS.Unix.SecureEventLogWriter">
<RegExp>(?'date'\S+\s+\d+\s+\d+:\d+:\d+)\s+(?:\S+:)?(?'hostname'\S+)\s+(?'process'sshd)\s*\[(?'processId'\d+)\]\s*:\s*Accepted \S+ for\s+(?'user'\S+)\s+from\s+(?'clientHost'\S+)</RegExp>
<EventType>1</EventType>
<EventId>27002</EventId>
</WriteAction>
</WriteActions>
</Rule>