linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
* Full shell access or sudo command
@ 2020-03-27  9:15 MAUPERTUIS, PHILIPPE
  2020-03-27 13:40 ` Paul Moore
  2020-03-27 14:36 ` Steve Grubb
  0 siblings, 2 replies; 4+ messages in thread
From: MAUPERTUIS, PHILIPPE @ 2020-03-27  9:15 UTC (permalink / raw)
  To: linux-audit


[-- Attachment #1.1: Type: text/plain, Size: 1331 bytes --]

Hi,
Our sysadmins are able to use sudo to take a root shell and do whatever they want.
On the contrary, application managers for example have only a limited set of sudo scripts and commands
Is it possible to find if a given audit message (for example due to a watch on a file) has been  issued in the context of sudo or a shell?
My goal is to be able  to search for potential sudo abuse through misconfiguration.

Philippe

Worldline and equensWorldline are a registered trademarks and trading names owned by Worldline Group.
This e-mail and the documents attached are confidential and intended solely for the addressee. If you receive this e-mail in error, you are not authorized to copy, disclose, use or retain it. Please notify the sender immediately and delete this email from your systems. As emails may be intercepted, amended or lost, they are not secure. EquensWorldline and the Worldline Group therefore can accept no liability for any errors or their content. Although equensWorldline and the Worldline Group endeavours to maintain a virus-free network, we do not warrant that this transmission is virus-free and can accept no liability for any damages resulting from any virus transmitted. The risks are deemed to be accepted by everyone who communicates with equensWorldline and the Worldline Group by email

[-- Attachment #1.2: Type: text/html, Size: 6315 bytes --]

[-- Attachment #2: Type: text/plain, Size: 102 bytes --]

--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Full shell access or sudo command
  2020-03-27  9:15 Full shell access or sudo command MAUPERTUIS, PHILIPPE
@ 2020-03-27 13:40 ` Paul Moore
  2020-03-27 14:36 ` Steve Grubb
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Moore @ 2020-03-27 13:40 UTC (permalink / raw)
  To: MAUPERTUIS, PHILIPPE; +Cc: linux-audit

On Fri, Mar 27, 2020 at 5:18 AM MAUPERTUIS, PHILIPPE
<philippe.maupertuis@equensworldline.com> wrote:
>
> Hi,
>
> Our sysadmins are able to use sudo to take a root shell and do whatever they want.
>
> On the contrary, application managers for example have only a limited set of sudo scripts and commands
>
> Is it possible to find if a given audit message (for example due to a watch on a file) has been  issued in the context of sudo or a shell?
>
> My goal is to be able  to search for potential sudo abuse through misconfiguration.

I'm sure others will have suggestions, probably better than mine, but
I would think that putting a watch on the sudo binary and paying
careful attention to the login UID ("auid" field) and session ("ses"
field) could be helpful.

-- 
paul moore
www.paul-moore.com


--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Full shell access or sudo command
  2020-03-27  9:15 Full shell access or sudo command MAUPERTUIS, PHILIPPE
  2020-03-27 13:40 ` Paul Moore
@ 2020-03-27 14:36 ` Steve Grubb
  2020-03-27 16:18   ` Richard Guy Briggs
  1 sibling, 1 reply; 4+ messages in thread
From: Steve Grubb @ 2020-03-27 14:36 UTC (permalink / raw)
  To: linux-audit; +Cc: MAUPERTUIS, PHILIPPE

On Friday, March 27, 2020 5:15:37 AM EDT MAUPERTUIS, PHILIPPE wrote:
> Hi,
> Our sysadmins are able to use sudo to take a root shell and do whatever
> they want. On the contrary, application managers for example have only a
> limited set of sudo scripts and commands Is it possible to find if a given
> audit message (for example due to a watch on a file) has been  issued in
> the context of sudo or a shell? My goal is to be able  to search for
> potential sudo abuse through misconfiguration.

Assuming direct root login is disabled since root is a shared account, then 
any event with uid ==0 and session != -1 has to be under sudo/su.

-Steve


--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Full shell access or sudo command
  2020-03-27 14:36 ` Steve Grubb
@ 2020-03-27 16:18   ` Richard Guy Briggs
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Guy Briggs @ 2020-03-27 16:18 UTC (permalink / raw)
  To: Steve Grubb; +Cc: linux-audit, MAUPERTUIS, PHILIPPE

On 2020-03-27 10:36, Steve Grubb wrote:
> On Friday, March 27, 2020 5:15:37 AM EDT MAUPERTUIS, PHILIPPE wrote:
> > Hi,
> > Our sysadmins are able to use sudo to take a root shell and do whatever
> > they want. On the contrary, application managers for example have only a
> > limited set of sudo scripts and commands Is it possible to find if a given
> > audit message (for example due to a watch on a file) has been  issued in
> > the context of sudo or a shell? My goal is to be able  to search for
> > potential sudo abuse through misconfiguration.
> 
> Assuming direct root login is disabled since root is a shared account, then 
> any event with uid ==0 and session != -1 has to be under sudo/su.

Or uid==0 and auid=>1000 (or 500 on some systems)?

> -Steve

- RGB

--
Richard Guy Briggs <rgb@redhat.com>
Sr. S/W Engineer, Kernel Security, Base Operating Systems
Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635

--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-27 16:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27  9:15 Full shell access or sudo command MAUPERTUIS, PHILIPPE
2020-03-27 13:40 ` Paul Moore
2020-03-27 14:36 ` Steve Grubb
2020-03-27 16:18   ` Richard Guy Briggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).