exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

2fax.txt

2fax.txt
Posted Jul 8, 2002
Authored by Crazy Einstein

2fax prior to v2.02 for Linux and Windows contains a locally exploitable buffer overflow.

tags | overflow
systems | linux, windows
SHA-256 | 14214e7f949c470b58c600c51e76ebc4d256a68496c77854fa8efd95dc259861

2fax.txt

Change Mirror Download
+-[ Limpid Byte Advisory #003]---------------------------------+
| |
| Program: 2fax |
| Version: all ( <=2.02 ) |
| OS: Linux/Windows |
| Bug: Buffer Overflow in -bpcx option |
| Homepage: http://www.atbas.org |
| |
| Discovered by Crazy Einstein [crazy_einstein@yahoo.com] |
| |
+--------------------------------------------------------------+

+Intro+--------------------------------------------------------+

2fax (by Hans Harder): 2fax is a commandline program which
converts ASCII files into fax (tiff) formatted files. It
works with Hylafax (Linux) and bgfax (DOS/Windows). It also
uses PCX files for logos and signatures, which can be overlayed
over the ASCII text.

+Bug+----------------------------------------------------------+

When you execute 2fax program with -bpcx option puting in this
option many symbols ( >212 ) program will make SEGFAULT:

[root@ns 2fax-2.02]# ./2fax -bpcx:`perl -e 'print "A"x666'` aaa aaa
Segmentation fault (core dumped)
[root@ns 2fax-2.02]# gdb 2fax core
...
#0 0x41414141 in ?? ()
(gdb)
...

So, we can execute arbitrary code with uid/gid of author of this
program if this program have suid bits

+Solution+-----------------------------------------------------+

(1) Clear suid bit from program:

[root@ns 2fax-2.02]# chmod ug-s /path/to/2fax

(2) Edit source of 2fax program:

...
char page_pcxfn[81]=""; /* page pcx file */
...
word setswitches(char *sw, word cmdline, word def)
{
...
case 17 :
if(&sw[l]<=81) { // make this check on length
strcpy(page_pcxfn,&sw[l]);
if (cmdline==0) page_pcxno=Openpcx(1,page_pcxfn); /*1.91*/
}
else printf("Error: Length of pcx file is too big (max 81)\n");
break;
...
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close