Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

perl POSIX setuid root

7 réponses
Avatar
fakessh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bonjour les newsgroups

tout le monde se parle nous formons un groupe uni
"special d'accord" mais solide

je cherche de la doocumenation sur je crois la parti posix de perl
pour effectuer l'operation correspondante en c


#include <unistd.h>

void main(void)
{

setuid(0);
setgid(0);
execl("/bin/sh","sh",NULL);

}


ma question ne porte pas sur l ouverture du shell
mais l equivalent de
setuid(0);
setgid(0);

pouvez vous me repondre en m expliquand

merci beaucoup
- --
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
gpg --keyserver pgp.mit.edu --recv-key C2626742

http://about.me/fakessh
http://urlshort.eu fakessh @
http://gplus.to/sshfake
http://gplus.to/sshswilting
http://gplus.to/john.swilting
https://lists.fakessh.eu/mailman/
This list is moderated by me, but all applications will be accepted
provided they receive a note of presentation
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlBmGYAACgkQNgqL0sJiZ0ItJACglauhOvvcVr07N2FL4sQ151C6
lt4AnA8/v0hYUY0YvZi/j43ZRfgar3qS
=YJ43
-----END PGP SIGNATURE-----

7 réponses

Avatar
fakessh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 28/09/2012 23:41, fakessh a écrit :
bonjour les newsgroups

tout le monde se parle nous formons un groupe uni "special
d'accord" mais solide

je cherche de la doocumenation sur je crois la parti posix de perl
pour effectuer l'operation correspondante en c


#include <unistd.h>

void main(void) {

setuid(0); setgid(0); execl("/bin/sh","sh",NULL);

}


ma question ne porte pas sur l ouverture du shell mais l equivalent
de setuid(0); setgid(0);

pouvez vous me repondre en m expliquand

merci beaucoup




serait il possible de donner la valeur 0 à

#!/usr/bin/perl -wT

use POSIX;

my $uid = getuid() or die "Failed to determine user id.";
my $euid = geteuid() or die "Failed to determine effective user id.";

print "UID = $uid, EUID = $euid.n";



- --
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
gpg --keyserver pgp.mit.edu --recv-key C2626742

http://about.me/fakessh
http://urlshort.eu fakessh @
http://gplus.to/sshfake
http://gplus.to/sshswilting
http://gplus.to/john.swilting
https://lists.fakessh.eu/mailman/
This list is moderated by me, but all applications will be accepted
provided they receive a note of presentation
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlBmG2MACgkQNgqL0sJiZ0LTqQCglNSpv+o4g+wWZkdKD5DfFekZ
dSEAn2DDhsbpv+jYjvBPFqOTOY4gLzNL
=JZFZ
-----END PGP SIGNATURE-----
Avatar
fakessh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 28/09/2012 23:49, fakessh a écrit :
Le 28/09/2012 23:41, fakessh a écrit :
bonjour les newsgroups



tout le monde se parle nous formons un groupe uni "special
d'accord" mais solide



je cherche de la doocumenation sur je crois la parti posix de
perl pour effectuer l'operation correspondante en c




#include <unistd.h>



void main(void) {



setuid(0); setgid(0); execl("/bin/sh","sh",NULL);



}




ma question ne porte pas sur l ouverture du shell mais l
equivalent de setuid(0); setgid(0);



pouvez vous me repondre en m expliquand



merci beaucoup




serait il possible de donner la valeur 0 à

#!/usr/bin/perl -wT

use POSIX;

my $uid = getuid() or die "Failed to determine user id."; my
$euid = geteuid() or die "Failed to determine effective user id.";

print "UID = $uid, EUID = $euid.n";






quand j ecris cela pas de resultat
use POSIX;

my $setuid= POSIX::setuid(0);
print $setuid,"its smart rootn";


- --
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
gpg --keyserver pgp.mit.edu --recv-key C2626742

http://about.me/fakessh
http://urlshort.eu fakessh @
http://gplus.to/sshfake
http://gplus.to/sshswilting
http://gplus.to/john.swilting
https://lists.fakessh.eu/mailman/
This list is moderated by me, but all applications will be accepted
provided they receive a note of presentation
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlBmIJQACgkQNgqL0sJiZ0KvIQCgjyexRloCUnQCiuwpKgILnTIQ
WJgAnigmnIRHi/xA7ezoPplpdtOnWkxL
=MLQb
-----END PGP SIGNATURE-----
Avatar
Paul Gaborit
À (at) Sat, 29 Sep 2012 00:11:32 +0200,
fakessh écrivait (wrote):

quand j ecris cela pas de resultat
use POSIX;

my $setuid= POSIX::setuid(0);
print $setuid,"its smart rootn";



Comme conseillé par la doc, il faut lire ce qui concerne la variable
$UID (ou $<) dans perlvar. En résumé, il faut regarder ce que contient
$! après l'appel à setuid...

--
Paul Gaborit - <http://perso.mines-albi.fr/~gaborit/>
Perl en français - <http://perl.mines-albi.fr/>
Avatar
espie
In article <k455hs$nh7$,
fakessh wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bonjour les newsgroups

tout le monde se parle nous formons un groupe uni
"special d'accord" mais solide

je cherche de la doocumenation sur je crois la parti posix de perl
pour effectuer l'operation correspondante en c


#include <unistd.h>

void main(void)


int main()
{

setuid(0);
setgid(0);
execl("/bin/sh","sh",NULL);

}


ma question ne porte pas sur l ouverture du shell
mais l equivalent de
setuid(0);
setgid(0);

pouvez vous me repondre en m expliquand



C'est curieux, on vous a deja vu passer sur fr.comp.lang.c.

La-aussi, la question etait relativement simple, et le theme
encore plus clair.

Donc maintenant, vous avez votre petit serveur de pirate qui
marche, et vous etes en train de bidouiller pour voir pourquoi
votre attaque initiale ne vous donne pas directement les
droits de root, c'est bien ca ?
Avatar
fakessh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 29/09/2012 09:14, Marc Espie a écrit :
In article <k455hs$nh7$, fakessh
wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

bonjour les newsgroups

tout le monde se parle nous formons un groupe uni "special
d'accord" mais solide

je cherche de la doocumenation sur je crois la parti posix de
perl pour effectuer l'operation correspondante en c


#include <unistd.h>

void main(void)


int main()
{

setuid(0); setgid(0); execl("/bin/sh","sh",NULL);

}


ma question ne porte pas sur l ouverture du shell mais l
equivalent de setuid(0); setgid(0);

pouvez vous me repondre en m expliquand



C'est curieux, on vous a deja vu passer sur fr.comp.lang.c.

La-aussi, la question etait relativement simple, et le theme encore
plus clair.

Donc maintenant, vous avez votre petit serveur de pirate qui
marche, et vous etes en train de bidouiller pour voir pourquoi
votre attaque initiale ne vous donne pas directement les droits de
root, c'est bien ca ?




je suis tombe sur cela

http://www.cpan.org/src/5.0/fixsperl-0
- --
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
gpg --keyserver pgp.mit.edu --recv-key C2626742

http://about.me/fakessh
http://urlshort.eu fakessh @
http://gplus.to/sshfake
http://gplus.to/sshswilting
http://gplus.to/john.swilting
https://lists.fakessh.eu/mailman/
This list is moderated by me, but all applications will be accepted
provided they receive a note of presentation
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlBnbfkACgkQNgqL0sJiZ0JbvACg0dBj/dhNxzUf6f1ScErLbDPS
UBQAn0uic8HN3kY9HPse6T1ZfrUYxHH6
=1SAf
-----END PGP SIGNATURE-----
Avatar
Olivier Miakinen
Le 29/09/2012 23:54, fakessh a écrit :

je suis tombe sur cela

http://www.cpan.org/src/5.0/fixsperl-0
- --
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
gpg --keyserver pgp.mit.edu --recv-key C2626742

http://about.me/fakessh
http://urlshort.eu fakessh @
http://gplus.to/sshfake
http://gplus.to/sshswilting
http://gplus.to/john.swilting
https://lists.fakessh.eu/mailman/
This list is moderated by me, but all applications will be accepted
provided they receive a note of presentation
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlBnbfkACgkQNgqL0sJiZ0JbvACg0dBj/dhNxzUf6f1ScErLbDPS
UBQAn0uic8HN3kY9HPse6T1ZfrUYxHH6
=1SAf
-----END PGP SIGNATURE-----



Aïe ! Tu es tombé sur une liste de plus d'une demi-douzaine d'URL,
avec du texte en anglais, et une bouillie infâme de clé PGP ? Toutes
mes condoléances parce que c'est assez rude sur un groupe usenet où
généralement on parle en français, où les signatures sont courtes et
correctement signalées, et où il n'y a pas de binaire (fût-il encodé
en ASCII).

[suivi vers la poubelle]

--
Olivier Miakinen
Avatar
fakessh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 29/09/2012 01:51, Paul Gaborit a écrit :

À (at) Sat, 29 Sep 2012 00:11:32 +0200, fakessh
écrivait (wrote):

quand j ecris cela pas de resultat use POSIX;

my $setuid= POSIX::setuid(0); print $setuid,"its smart rootn";



Comme conseillé par la doc, il faut lire ce qui concerne la
variable $UID (ou $<) dans perlvar. En résumé, il faut regarder ce
que contient $! après l'appel à setuid...





en ecrivant ceci

$< = 0;
my $setuid= POSIX::setuid($<) or die "erreur setuid $!";
print $setuid," its smart rootn"

j obtiens dans le terminal
0 but true its smart root


que veut dire le resultat
- --
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
gpg --keyserver pgp.mit.edu --recv-key C2626742

http://about.me/fakessh
http://urlshort.eu fakessh @
http://gplus.to/sshfake
http://gplus.to/sshswilting
http://gplus.to/john.swilting
https://lists.fakessh.eu/mailman/
This list is moderated by me, but all applications will be accepted
provided they receive a note of presentation
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlBnhacACgkQNgqL0sJiZ0KrZACgqOKZRnRdYBxeL2BMW9upNKNT
RyIAn3FaSf/bDwDdJGgRkO6TWPols8YJ
=+VDA
-----END PGP SIGNATURE-----