OpenVAS Libraries  4.0+rc3.SVN
misc/ids_send.h
00001 /* OpenVAS
00002  * $Id$
00003  * Description: IDS stressing functions.
00004  *
00005  * ids_send() sends data spliced into several packets, with bad packets
00006  * between them, thus making bad NIDSes reassemble the tcp stream awkwardly;
00007  *
00008  * ids_open_sock_tcp() opens a tcp socket and immediately sends a badly
00009  * formed RST packet to the remote host, thus making bad NIDSes think
00010  * the connection was immediately dropped on our end.
00011  *
00012  * Authors:
00013  * Renaud Deraison <deraison@nessus.org> (Original pre-fork development)
00014  *
00015  * Copyright:
00016  * Based on work Copyright (C) 1998 - 2002 Renaud Deraison
00017  *
00018  * This library is free software; you can redistribute it and/or
00019  * modify it under the terms of the GNU Library General Public
00020  * License as published by the Free Software Foundation; either
00021  * version 2 of the License, or (at your option) any later version.
00022  *
00023  * This library is distributed in the hope that it will be useful,
00024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00026  * Library General Public License for more details.
00027  *
00028  * You should have received a copy of the GNU General Public License
00029  * along with this program; if not, write to the Free Software
00030  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
00031  */
00032 
00033 #ifndef __OPENVAS_IDS_SEND_H__
00034 #define __OPENVAS_IDS_SEND_H__
00035 
00036 /* for struct arglist */
00037 #include "arglists.h"
00038 
00039 /*
00040  * Transport layer options
00041  * XXX: These defines were moved here from libopenvas.h sind they
00042  * are used most often in ids_send module. More reengineering
00043  * probably needed.
00044  */
00045 #define OPENVAS_CNX_IDS_EVASION_SPLIT 1L      /* Try to evade NIDS by spliting sends */
00046 #define OPENVAS_CNX_IDS_EVASION_INJECT  2L      /* Split + insert garbage */
00047 #define OPENVAS_CNX_IDS_EVASION_SHORT_TTL 4L    /* Split + too short ttl for garbage */
00048 #define OPENVAS_CNX_IDS_EVASION_FAKE_RST  8L    /* Send a fake RST from our end after each established connection */
00049 
00050 #define OPENVAS_CNX_IDS_EVASION_SEND_MASK (OPENVAS_CNX_IDS_EVASION_SPLIT|OPENVAS_CNX_IDS_EVASION_INJECT|OPENVAS_CNX_IDS_EVASION_SHORT_TTL)
00051 
00052 int ids_send (int, void *, int, int);
00053 int ids_open_sock_tcp (struct arglist *, int, int, int);
00054 
00055 #endif