ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Andrey Rahmatullin <wrar@yandex.ru>
To: devel@altlinux.ru
Subject: Re: [devel] Q: работающий local root exploit
Date: Sun, 12 Sep 2004 17:56:20 +0600
Message-ID: <20040912115620.GA3140@wrars-comp.wrarsdomain> (raw)
In-Reply-To: <20040912221334.1b89f0e9.dima@sakhalin.ru>

[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]

On Sun, Sep 12, 2004 at 10:13:34PM +1100, Dmitry Lebkov wrote:
>16:44 < dmi> первый ещё работает :-)
>16:46 < dmi> http://www.security.com.vn/details.php?ID=215
>16:46 < dmi> instant root#
>16:46 < dmi> даже на сизифе
>Оно дествительно работает ... :(
Если закомментировать в эксплоите кусок, выделяющий себе всю память,
получаем очень странный шелл:

wrar@wrars-comp ~ $ ./a.out
sh-2.05b# whoami
root
sh-2.05b# ls /boot
ls: /boot: Permission denied
sh-2.05b# id
uid=0(root) gid=0(root)
группы=6(disk),10(wheel),14(uucp),16(rpm),36(hashman),80(cdwriter),81(audio),111(wine),500(wrar),501(wrar_a),502(wrar_b),503(hashuser)

Т.е. обычный юзер wrar, но с uid=gid=0, и даже не состоящий в группе root.

Впрочем, всё понятно:

$ < /tmp/own.c
int getuid() { return 0; }
int geteuid() { return 0; }
int getgid() { return 0; }
int getegid() { return 0; }

В принципе, никакого эксплоита не надо, можно скомпилить прямо этот код и
запустить шелл с LD_PRELOAD точно так же, как в эксплоите. Еще что я не
понял: в char hellc0de[] в конце после нулевого символа стоит /bin/sh, так
оно обрезается при fprintf().

-- 
WBR, wRAR (ALT Linux Team)
Powered by the ALT Linux fortune(8):

Опыт показывает, что это не так - большинство пользователей rpm не читали
Maximum RPM.
		-- ldv in devel@

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2004-09-12 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-12 11:13 Dmitry Lebkov
2004-09-12 11:52 ` Ivan Fedorov
2004-09-12 12:22   ` Dmitry Lebkov
2004-09-12 11:56 ` Andrey Rahmatullin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040912115620.GA3140@wrars-comp.wrarsdomain \
    --to=wrar@yandex.ru \
    --cc=devel@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git