Compare commits
1
Commits
2.8-stable
..
2.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2f476c869 |
+1
-3
@@ -19,8 +19,6 @@ compile
|
||||
/example/.deps/
|
||||
/example/Makefile
|
||||
/example/ndpiReader
|
||||
/example/Makefile.dpdk
|
||||
/example/build
|
||||
*.in
|
||||
/install-sh
|
||||
*.ko
|
||||
@@ -37,7 +35,7 @@ compile
|
||||
/m4/ltversion.m4
|
||||
/Makefile
|
||||
/missing
|
||||
*.[o]
|
||||
*.[oa]
|
||||
*.obj
|
||||
*o.cmd
|
||||
*o.cmd
|
||||
|
||||
@@ -1,92 +1,5 @@
|
||||
# CHANGELOG
|
||||
|
||||
#### nDPI 2.8 (March 2019)
|
||||
|
||||
## New Supported Protocols and Services
|
||||
|
||||
* Added Modbus over TCP dissector
|
||||
|
||||
## Improvements
|
||||
|
||||
* Wireshark Lua plugin compatibility with Wireshark 3
|
||||
* Improved MDNS dissection
|
||||
* Improved HTTP response code handling
|
||||
* Full dissection of HTTP responses
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fixed false positive mining detection
|
||||
* Fixed invalid TCP DNS dissection
|
||||
* Releasing buffers upon `realloc` failures
|
||||
* ndpiReader: Prevents references after free
|
||||
* Endianness fixes
|
||||
* Fixed IPv6 HTTP traffic dissection
|
||||
* Fixed H.323 detection
|
||||
|
||||
## Other
|
||||
|
||||
* Disabled ookla statistics which need to be improved
|
||||
* Support for custom protocol files of arbitrary length
|
||||
* Update radius.c to RFC2865
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
#### nDPI 2.6 (December 2018)
|
||||
|
||||
## New Supported Protocols and Services
|
||||
|
||||
* New Bitcoin, Ethereum, ZCash, Monero dissectors all identified as Mining
|
||||
* New Signal.org dissector
|
||||
* New Nest Log Sink dissector
|
||||
* New UPnP dissector
|
||||
* Added support for SMBv1 traffic, split from SMBv23
|
||||
|
||||
## Improvements
|
||||
|
||||
* Improved Skype detection, merged Skype call in/out into Skype Call
|
||||
* Improved heuristics for Skype, Teredo, Netbios
|
||||
* Improved SpeedTest (Ookla) detection
|
||||
* Improved WhatsApp detection
|
||||
* Improved WeChat detection
|
||||
* Improved Facebook Messenger detection
|
||||
* Improved Messenger/Hangout detection
|
||||
* Improved SSL detection, prevent false positives
|
||||
* Improved guess for UDP protocols
|
||||
* Improved STUN detection
|
||||
* Added more Ubuntu servers
|
||||
* Added missing categorization with giveup/guess
|
||||
* Optimizations for TCP flows that do not start with a SYN packet (early giveup)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fixed eDonkey false positives
|
||||
* Fixed Dropbox dissector
|
||||
* Fixed Spotify dissector
|
||||
* Fixed custom protocol loading
|
||||
* Fixed missing Application Data packet for TLS
|
||||
* Fixed buffer overflows
|
||||
* Fixed custom categories match by IP
|
||||
* Fixed category field not accounted in ndpi_get_proto_category
|
||||
* Fixed null pointer dereference in ndpi_detection_process_packet
|
||||
* Fixed compilation on Mac
|
||||
|
||||
## Other
|
||||
|
||||
* Deb and RPM packages: ndpi with shared libraries and binaries, ndpi-dev with headers and static libraries
|
||||
* Protocols now have an optional subprotocol: Spotify cannot have subprotocols, DNS can (DNS.Spotify)
|
||||
* New API functions:
|
||||
- ndpi_fill_ip_protocol_category to handle ICMP flows category
|
||||
- ndpi_flowv4_flow_hash and ndpi_flowv6_flow_hash to support the Community ID Flow Hashing (https://github.com/corelight/community-id-spec)
|
||||
- ndpi_protocol2id to print the protocol as ID
|
||||
- ndpi_get_custom_category_match to search host in custom categories
|
||||
* Changed ndpi_detection_giveup API: guess is now part of the call
|
||||
* Added DPDK support to ndpiReader
|
||||
* Removed Musical.ly protocol (service no longer used)
|
||||
* Custom categories have now priority over protocol related categories
|
||||
* Improved clang support
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
#### nDPI 2.4 (August 2018)
|
||||
|
||||
## New Supported Protocols and Services
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = src/lib example tests
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libndpi.pc
|
||||
|
||||
EXTRA_DIST = autogen.sh
|
||||
EXTRA_DIST = libndpi.sym autogen.sh
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# nDPI
|
||||
|
||||
[](https://travis-ci.org/ntop/nDPI)
|
||||
[](https://lgtm.com/projects/g/ntop/nDPI/context:cpp)
|
||||
[](https://lgtm.com/projects/g/ntop/nDPI/alerts)
|
||||
|
||||
## What is nDPI ?
|
||||
|
||||
@@ -36,13 +34,15 @@ The entire procedure of adding new protocols in detail:
|
||||
5. Choose (do not change anything) a selection bitmask from: src/include/ndpi_define.h
|
||||
6. Add a new entry in ndpi_set_protocol_detection_bitmask2 in: src/lib/ndpi_main.c
|
||||
7. Set protocol default ports in ndpi_init_protocol_defaults in: src/lib/ndpi_main.c
|
||||
8. ./autogen.sh
|
||||
9. make
|
||||
10. make check
|
||||
8. Add the new protocol file to: src/lib/Makefile.am
|
||||
9. ./autogen.sh
|
||||
10. ./configure
|
||||
11. make
|
||||
12. make check
|
||||
|
||||
### How to use nDPI to Block Selected Traffic
|
||||
|
||||
You can use nDPI to selectively block selected Internet traffic by embedding it onto an application (remember that nDPI is just a library). Both [ntopng](https://github.com/ntop/ntopng) and [nProbe cento](http://www.ntop.org/products/netflow/nprobe-cento/) can do this.
|
||||
You can use nDPI to selectively block selected Internet traffic by embedding it onto an application (remember that nDPI us just a library). Both [ntopng](https://github.com/ntop/ntopng) and [nProbe cento](http://www.ntop.org/products/netflow/nprobe-cento/) can do this.
|
||||
|
||||
### DISCLAIMER
|
||||
While we do our best to detect network protocols, we cannot guarantee that our software is error free and 100% accurate in protocol detection. Please make sure that you respect the privacy of users and you have proper authorization to listen, capture and inspect network traffic.
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
NDPI_MAJOR="2"
|
||||
NDPI_MINOR="8"
|
||||
NDPI_MINOR="4"
|
||||
NDPI_PATCH="0"
|
||||
NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH"
|
||||
|
||||
rm -f configure config.h config.h.in
|
||||
rm -f configure config.h config.h.in src/lib/Makefile.in
|
||||
|
||||
AUTOCONF=$(command -v autoconf)
|
||||
AUTOMAKE=$(command -v automake)
|
||||
|
||||
+3
-25
@@ -10,7 +10,6 @@ AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AX_PTHREAD
|
||||
|
||||
NDPI_VERSION_SHORT="@NDPI_VERSION_SHORT@"
|
||||
NDPI_MAJOR="@NDPI_MAJOR@"
|
||||
NDPI_MINOR="@NDPI_MINOR@"
|
||||
NDPI_PATCH="@NDPI_PATCH@"
|
||||
@@ -40,14 +39,6 @@ AC_CHECK_HEADERS([netinet/in.h stdint.h stdlib.h string.h unistd.h])
|
||||
|
||||
PCAP_HOME=$HOME/PF_RING/userland
|
||||
|
||||
DPDK_TARGET=
|
||||
if test -d $HOME/DPDK; then :
|
||||
echo "Enabling DPDK support in ndpiReader"
|
||||
DPDK_TARGET=dpdk
|
||||
else
|
||||
echo "DPDK support disabled (missing $HOME/DPDK)"
|
||||
fi
|
||||
|
||||
if test -d $PCAP_HOME; then :
|
||||
echo -n ""
|
||||
else
|
||||
@@ -60,20 +51,11 @@ else
|
||||
AC_CHECK_LIB([numa], [numa_available], [LIBNUMA="-lnuma"])
|
||||
fi
|
||||
|
||||
MACHINE=`uname -m`
|
||||
SYSTEM=`uname -s`
|
||||
if test $SYSTEM = "Darwin"; then
|
||||
CC=clang
|
||||
fi
|
||||
|
||||
if test $ax_cv_PTHREAD_CLANG = "yes"; then
|
||||
CC=clang
|
||||
fi
|
||||
|
||||
|
||||
HS_LIB=
|
||||
HS_INC=
|
||||
|
||||
AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan])
|
||||
AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan])
|
||||
|
||||
if test "${with_hyperscan+set}" = set; then
|
||||
BKP=$LIBS
|
||||
@@ -86,8 +68,6 @@ if test "${with_hyperscan+set}" = set; then
|
||||
AC_CHECK_LIB([stdc++], [main])
|
||||
HS_INC=`pkg-config --cflags libhs`
|
||||
HS_LIB=`pkg-config --libs libhs`
|
||||
LDFLAGS="$LDFLAGS $HS_LIB"
|
||||
AC_MSG_RESULT([compiling with Intel Hyperscan])
|
||||
else
|
||||
AC_MSG_RESULT([Intel Hyperscan not found, exiting. See https://github.com/intel/hyperscan/blob/master/doc/dev-reference/getting_started.rst for install/build instructions])
|
||||
exit 1
|
||||
@@ -147,13 +127,12 @@ AC_ARG_ENABLE([debug-messages],
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
|
||||
|
||||
AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile])
|
||||
AC_CONFIG_FILES([Makefile example/Makefile tests/Makefile libndpi.pc src/include/ndpi_define.h])
|
||||
AC_CONFIG_HEADERS(src/include/ndpi_config.h)
|
||||
AC_SUBST(GIT_RELEASE)
|
||||
AC_SUBST(NDPI_MAJOR)
|
||||
AC_SUBST(NDPI_MINOR)
|
||||
AC_SUBST(NDPI_PATCH)
|
||||
AC_SUBST(NDPI_VERSION_SHORT)
|
||||
AC_SUBST(SVN_DATE)
|
||||
AC_SUBST(JSON_C_LIB)
|
||||
AC_SUBST(PCAP_INC)
|
||||
@@ -161,7 +140,6 @@ AC_SUBST(PCAP_LIB)
|
||||
AC_SUBST(DL_LIB)
|
||||
AC_SUBST(HS_LIB)
|
||||
AC_SUBST(HS_INC)
|
||||
AC_SUBST(DPDK_TARGET)
|
||||
AC_SUBST(HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
bin_PROGRAMS = ndpiReader
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/lib/third_party/include @PCAP_INC@ @HS_INC@
|
||||
AM_CFLAGS = @PTHREAD_CFLAGS@ # --coverage
|
||||
|
||||
LDADD = $(top_builddir)/src/lib/libndpi.a @JSON_C_LIB@ @PTHREAD_LIBS@ @PCAP_LIB@ @DL_LIB@ @HS_LIB@ -lm
|
||||
AM_LDFLAGS = -static @DL_LIB@ @HS_LIB@
|
||||
|
||||
ndpiReader_SOURCES = ndpiReader.c ndpi_util.c ndpi_util.h uthash.h
|
||||
|
||||
ndpiReader.o: ndpiReader.c
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#
|
||||
# Run 'make -f Makefile.dpdk' to compile the DPDK examples
|
||||
#
|
||||
# See http://core.dpdk.org/doc/quick-start/ for DPDK installation and setup
|
||||
#
|
||||
ifeq ($(RTE_SDK),)
|
||||
#$(error "Please define RTE_SDK environment variable")
|
||||
RTE_SDK = $(HOME)/DPDK
|
||||
RTE_TARGET = build
|
||||
endif
|
||||
|
||||
# Default target, can be overridden by command line or environment
|
||||
RTE_TARGET ?= x86_64-native-linuxapp-gcc
|
||||
|
||||
include $(RTE_SDK)/mk/rte.vars.mk
|
||||
|
||||
APP = ndpiReader.dpdk
|
||||
LIBNDPI = $(PWD)/../src/lib/libndpi.a
|
||||
|
||||
SRCS-y := ndpi_util.c ndpiReader.c
|
||||
|
||||
CFLAGS += -g
|
||||
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-parameter -I $(PWD)/../src/include @CFLAGS@ -DUSE_DPDK
|
||||
LDLIBS = $(LIBNDPI) @PCAP_LIB@ -lpthread @LDFLAGS@
|
||||
|
||||
include $(RTE_SDK)/mk/rte.extapp.mk
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
CC=@CC@
|
||||
CFLAGS=-g -I../src/include @CFLAGS@
|
||||
LIBNDPI=../src/lib/libndpi.a
|
||||
LDFLAGS=$(LIBNDPI) @PCAP_LIB@ -lpthread @LDFLAGS@
|
||||
OBJS=ndpiReader.o ndpi_util.o
|
||||
PREFIX?=@prefix@
|
||||
|
||||
all: ndpiReader @DPDK_TARGET@
|
||||
|
||||
ndpiReader: $(OBJS) $(LIBNDPI)
|
||||
$(CXX) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS)
|
||||
|
||||
%.o: %.c $(HEADERS) Makefile
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
install:
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin/
|
||||
cp ndpiReader $(DESTDIR)$(PREFIX)/bin/
|
||||
[ -f build/app/ndpiReader.dpdk ] && cp build/app/ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true
|
||||
[ -f ndpiReader.dpdk ] && cp ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true
|
||||
|
||||
dpdk:
|
||||
make -f Makefile.dpdk
|
||||
|
||||
check:
|
||||
cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I../src/include -I/usr/local/include/json-c *.c
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o ndpiReader ndpiReader.dpdk
|
||||
/bin/rm -f .*.dpdk.cmd .*.o.cmd *.dpdk.map .*.o.d
|
||||
/bin/rm -f _install _postbuild _postinstall _preinstall
|
||||
/bin/rm -rf build
|
||||
|
||||
distclean: clean
|
||||
/bin/rm -f Makefile.dpdk
|
||||
/bin/rm -f Makefile
|
||||
@@ -1,31 +0,0 @@
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
You need to install and compile DPDK in your HOME directory as explained in
|
||||
See http://core.dpdk.org/doc/quick-start/ for DPDK installation and setup
|
||||
|
||||
Once DPDK is built make sure to create a symbolic link
|
||||
|
||||
$ cd
|
||||
$ ln -s dpdk-18.08 DPDK
|
||||
|
||||
so the build process will use the DPDK directory letting you have multiple
|
||||
DPDK versions available on your system
|
||||
|
||||
|
||||
Build
|
||||
-----
|
||||
Everything will happen automagically but if you want to do it by hand
|
||||
do: make -f Makefile.dpdk
|
||||
|
||||
|
||||
Run Application
|
||||
---------------
|
||||
Supposing to capture packets from device eno1 you can start the
|
||||
application as follows:
|
||||
|
||||
sudo ./build/ndpiReader -c 1 --vdev=net_pcap0,iface=eno1 -- -v 1
|
||||
|
||||
NOTE:
|
||||
- ndpiReader without DPDK support sits in this directory
|
||||
- ndpiReader with DPDK support can be found inside the ./build directory
|
||||
+89
-134
@@ -81,8 +81,7 @@ static json_object *jArray_topStats;
|
||||
static u_int8_t live_capture = 0;
|
||||
static u_int8_t undetected_flows_deleted = 0;
|
||||
/** User preferences **/
|
||||
u_int8_t enable_protocol_guess = 1;
|
||||
static u_int8_t verbose = 0, json_flag = 0;
|
||||
static u_int8_t enable_protocol_guess = 1, verbose = 0, json_flag = 0;
|
||||
int nDPI_LogLevel = 0;
|
||||
char *_debug_protocols = NULL;
|
||||
static u_int8_t stats_flag = 0, bpf_filter_flag = 0;
|
||||
@@ -94,11 +93,11 @@ static u_int16_t decode_tunnels = 0;
|
||||
static u_int16_t num_loops = 1;
|
||||
static u_int8_t shutdown_app = 0, quiet_mode = 0;
|
||||
static u_int8_t num_threads = 1;
|
||||
static struct timeval startup_time, begin, end;
|
||||
static struct timeval begin, end;
|
||||
#ifdef linux
|
||||
static int core_affinity[MAX_NUM_READER_THREADS];
|
||||
#endif
|
||||
static struct timeval pcap_start = { 0, 0}, pcap_end = { 0, 0 };
|
||||
static struct timeval pcap_start, pcap_end;
|
||||
/** Detection parameters **/
|
||||
static time_t capture_for = 0;
|
||||
static time_t capture_until = 0;
|
||||
@@ -205,9 +204,7 @@ typedef struct ndpi_id {
|
||||
|
||||
// used memory counters
|
||||
u_int32_t current_ndpi_memory = 0, max_ndpi_memory = 0;
|
||||
#ifdef USE_DPDK
|
||||
static int dpdk_port_id = 0, dpdk_run_capture = 1;
|
||||
#endif
|
||||
|
||||
|
||||
void test_lib(); /* Forward */
|
||||
|
||||
@@ -230,11 +227,7 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle);
|
||||
static void help(u_int long_help) {
|
||||
printf("Welcome to nDPI %s\n\n", ndpi_revision());
|
||||
|
||||
printf("ndpiReader "
|
||||
#ifndef USE_DPDK
|
||||
"-i <file|device> "
|
||||
#endif
|
||||
"[-f <filter>][-s <duration>][-m <duration>]\n"
|
||||
printf("ndpiReader -i <file|device> [-f <filter>][-s <duration>][-m <duration>]\n"
|
||||
" [-p <protos>][-l <loops> [-q][-d][-h][-t][-v <level>]\n"
|
||||
" [-n <threads>][-w <file>][-c <file>][-j <file>][-x <file>]\n\n"
|
||||
"Usage:\n"
|
||||
@@ -464,18 +457,7 @@ static void parseOptions(int argc, char **argv) {
|
||||
if(trace) fprintf(trace, " #### %s #### \n", __FUNCTION__);
|
||||
#endif
|
||||
|
||||
#ifdef USE_DPDK
|
||||
{
|
||||
int ret = rte_eal_init(argc, argv);
|
||||
|
||||
if(ret < 0)
|
||||
rte_exit(EXIT_FAILURE, "Error with EAL initialization\n");
|
||||
|
||||
argc -= ret, argv += ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
while((opt = getopt_long(argc, argv, "c:df:g:i:hp:l:s:tv:V:n:j:rp:w:q0123:456:7:89:m:b:x:", longopts, &option_idx)) != EOF) {
|
||||
while ((opt = getopt_long(argc, argv, "c:df:g:i:hp:l:s:tv:V:n:j:rp:w:q0123:456:7:89:m:b:x:", longopts, &option_idx)) != EOF) {
|
||||
#ifdef DEBUG_TRACE
|
||||
if(trace) fprintf(trace, " #### -%c [%s] #### \n", opt, optarg ? optarg : "");
|
||||
#endif
|
||||
@@ -621,7 +603,7 @@ static void parseOptions(int argc, char **argv) {
|
||||
|
||||
case '9':
|
||||
extcap_packet_filter = ndpi_get_proto_by_name(ndpi_info_mod, optarg);
|
||||
if(extcap_packet_filter == NDPI_PROTOCOL_UNKNOWN) extcap_packet_filter = atoi(optarg);
|
||||
if (extcap_packet_filter == NDPI_PROTOCOL_UNKNOWN) extcap_packet_filter = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 257:
|
||||
@@ -634,7 +616,6 @@ static void parseOptions(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef USE_DPDK
|
||||
if(!bpf_filter_flag) {
|
||||
if(do_capture) {
|
||||
quiet_mode = 1;
|
||||
@@ -649,7 +630,7 @@ static void parseOptions(int argc, char **argv) {
|
||||
if(strchr(_pcap_file[0], ',')) { /* multiple ingress interfaces */
|
||||
num_threads = 0; /* setting number of threads = number of interfaces */
|
||||
__pcap_file = strtok(_pcap_file[0], ",");
|
||||
while(__pcap_file != NULL && num_threads < MAX_NUM_READER_THREADS) {
|
||||
while (__pcap_file != NULL && num_threads < MAX_NUM_READER_THREADS) {
|
||||
_pcap_file[num_threads++] = __pcap_file;
|
||||
__pcap_file = strtok(NULL, ",");
|
||||
}
|
||||
@@ -666,14 +647,13 @@ static void parseOptions(int argc, char **argv) {
|
||||
if(num_cores > 1 && bind_mask != NULL) {
|
||||
char *core_id = strtok(bind_mask, ":");
|
||||
thread_id = 0;
|
||||
while(core_id != NULL && thread_id < num_threads) {
|
||||
while (core_id != NULL && thread_id < num_threads) {
|
||||
core_affinity[thread_id++] = atoi(core_id) % num_cores;
|
||||
core_id = strtok(NULL, ":");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_TRACE
|
||||
if(trace) fclose(trace);
|
||||
@@ -739,7 +719,7 @@ char* intoaV4(u_int32_t addr, char* buf, u_int16_t bufLen) {
|
||||
}
|
||||
*--cp = '.';
|
||||
addr >>= 8;
|
||||
} while(--n > 0);
|
||||
} while (--n > 0);
|
||||
|
||||
/* Convert the string to lowercase */
|
||||
retStr = (char*)(cp+1);
|
||||
@@ -789,7 +769,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
||||
ndpi_get_proto_name(ndpi_thread_info[thread_id].workflow->ndpi_struct, flow->detected_protocol.app_protocol));
|
||||
|
||||
if(flow->detected_protocol.category != 0)
|
||||
fprintf(out, "[cat: %s/%u]",
|
||||
fprintf(out, "[cat: %s/%u]",
|
||||
ndpi_category_get_name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
|
||||
flow->detected_protocol.category),
|
||||
(unsigned int)flow->detected_protocol.category);
|
||||
@@ -906,6 +886,26 @@ static void node_print_known_proto_walker(const void *node,
|
||||
|
||||
/* ********************************** */
|
||||
|
||||
/**
|
||||
* @brief Guess Undetected Protocol
|
||||
*/
|
||||
static u_int16_t node_guess_undetected_protocol(u_int16_t thread_id, struct ndpi_flow_info *flow) {
|
||||
|
||||
flow->detected_protocol = ndpi_guess_undetected_protocol(ndpi_thread_info[thread_id].workflow->ndpi_struct,
|
||||
flow->protocol,
|
||||
ntohl(flow->src_ip),
|
||||
ntohs(flow->src_port),
|
||||
ntohl(flow->dst_ip),
|
||||
ntohs(flow->dst_port));
|
||||
// printf("Guess state: %u\n", flow->detected_protocol);
|
||||
if(flow->detected_protocol.app_protocol != NDPI_PROTOCOL_UNKNOWN)
|
||||
ndpi_thread_info[thread_id].workflow->stats.guessed_flow_protocols++;
|
||||
|
||||
return(flow->detected_protocol.app_protocol);
|
||||
}
|
||||
|
||||
/* ********************************** */
|
||||
|
||||
/**
|
||||
* @brief Proto Guess Walker
|
||||
*/
|
||||
@@ -913,13 +913,18 @@ static void node_proto_guess_walker(const void *node, ndpi_VISIT which, int dept
|
||||
struct ndpi_flow_info *flow = *(struct ndpi_flow_info **) node;
|
||||
u_int16_t thread_id = *((u_int16_t *) user_data);
|
||||
|
||||
if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */
|
||||
if((!flow->detection_completed) && flow->ndpi_flow) {
|
||||
flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[0].workflow->ndpi_struct, flow->ndpi_flow, enable_protocol_guess);
|
||||
}
|
||||
|
||||
process_ndpi_collected_info(ndpi_thread_info[thread_id].workflow, flow);
|
||||
if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */
|
||||
if((!flow->detection_completed) && flow->ndpi_flow)
|
||||
flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[0].workflow->ndpi_struct, flow->ndpi_flow);
|
||||
|
||||
if(enable_protocol_guess) {
|
||||
if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) {
|
||||
node_guess_undetected_protocol(thread_id, flow);
|
||||
}
|
||||
}
|
||||
|
||||
process_ndpi_collected_info(ndpi_thread_info[thread_id].workflow, flow);
|
||||
|
||||
ndpi_thread_info[thread_id].workflow->stats.protocol_counter[flow->detected_protocol.app_protocol] += flow->src2dst_packets + flow->dst2src_packets;
|
||||
ndpi_thread_info[thread_id].workflow->stats.protocol_counter_bytes[flow->detected_protocol.app_protocol] += flow->src2dst_bytes + flow->dst2src_bytes;
|
||||
ndpi_thread_info[thread_id].workflow->stats.protocol_flows[flow->detected_protocol.app_protocol]++;
|
||||
@@ -980,7 +985,7 @@ int updateIpTree(u_int32_t key, u_int8_t version,
|
||||
if(rootp == (addr_node **)0)
|
||||
return 0;
|
||||
|
||||
while(*rootp != (addr_node *)0) {
|
||||
while (*rootp != (addr_node *)0) {
|
||||
/* Knuth's T1: */
|
||||
if((version == (*rootp)->version) && (key == (*rootp)->addr)) {
|
||||
/* T2: */
|
||||
@@ -1010,12 +1015,13 @@ int updateIpTree(u_int32_t key, u_int8_t version,
|
||||
/* *********************************************** */
|
||||
|
||||
void freeIpTree(addr_node *root) {
|
||||
if(root == NULL)
|
||||
if (root == NULL)
|
||||
return;
|
||||
|
||||
freeIpTree(root->left);
|
||||
freeIpTree(root->right);
|
||||
free(root);
|
||||
root = NULL;
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
@@ -1204,9 +1210,9 @@ static void deleteReceivers(struct receiver *receivers) {
|
||||
/* *********************************************** */
|
||||
/* implementation of: https://jeroen.massar.ch/presentations/files/FloCon2010-TopK.pdf
|
||||
*
|
||||
* if(table1.size < max1 || acceptable){
|
||||
* if (table1.size < max1 || acceptable){
|
||||
* create new element and add to the table1
|
||||
* if(table1.size > max2) {
|
||||
* if (table1.size > max2) {
|
||||
* cut table1 back to max1
|
||||
* merge table 1 to table2
|
||||
* if(table2.size > max1)
|
||||
@@ -1390,12 +1396,23 @@ static void node_idle_scan_walker(const void *node, ndpi_VISIT which, int depth,
|
||||
|
||||
|
||||
/**
|
||||
* @brief On Protocol Discover - demo callback
|
||||
* @brief On Protocol Discover - call node_guess_undetected_protocol() for protocol
|
||||
*/
|
||||
static void on_protocol_discovered(struct ndpi_workflow * workflow,
|
||||
struct ndpi_flow_info * flow,
|
||||
void * udata) {
|
||||
;
|
||||
const u_int16_t thread_id = (uintptr_t) udata;
|
||||
|
||||
if(verbose > 1) {
|
||||
if(enable_protocol_guess) {
|
||||
if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) {
|
||||
flow->detected_protocol.app_protocol = node_guess_undetected_protocol(thread_id, flow),
|
||||
flow->detected_protocol.master_protocol = NDPI_PROTOCOL_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
// printFlow(thread_id, flow);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -1459,7 +1476,7 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) {
|
||||
ndpi_set_detection_preferences(ndpi_thread_info[thread_id].workflow->ndpi_struct,
|
||||
ndpi_pref_http_dont_dissect_response, 0);
|
||||
ndpi_set_detection_preferences(ndpi_thread_info[thread_id].workflow->ndpi_struct,
|
||||
ndpi_pref_dns_dont_dissect_response, 0);
|
||||
ndpi_pref_dns_dissect_response, 0);
|
||||
ndpi_set_detection_preferences(ndpi_thread_info[thread_id].workflow->ndpi_struct,
|
||||
ndpi_pref_enable_category_substring_match, 1);
|
||||
|
||||
@@ -1890,7 +1907,7 @@ void printPortStats(struct port_stats *stats) {
|
||||
/**
|
||||
* @brief Print result
|
||||
*/
|
||||
static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_usec) {
|
||||
static void printResults(u_int64_t tot_usec) {
|
||||
u_int32_t i;
|
||||
u_int64_t total_flow_bytes = 0;
|
||||
u_int32_t avg_pkt_size = 0;
|
||||
@@ -1953,9 +1970,7 @@ static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_us
|
||||
printf("\tFlow Memory (per flow): %-13s\n", formatBytes(sizeof(struct ndpi_flow_struct), buf, sizeof(buf)));
|
||||
printf("\tActual Memory: %-13s\n", formatBytes(current_ndpi_memory, buf, sizeof(buf)));
|
||||
printf("\tPeak Memory: %-13s\n", formatBytes(max_ndpi_memory, buf, sizeof(buf)));
|
||||
printf("\tSetup Time: %lu msec\n", (unsigned long)(setup_time_usec/1000));
|
||||
printf("\tPacket Processing Time: %lu msec\n", (unsigned long)(processing_time_usec/1000));
|
||||
|
||||
|
||||
if(!json_flag) {
|
||||
printf("\nTraffic statistics:\n");
|
||||
printf("\tEthernet bytes: %-13llu (includes ethernet CRC/IFC/trailer)\n",
|
||||
@@ -1986,15 +2001,13 @@ static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_us
|
||||
printf("\tPacket Len 1024-1500: %-13lu\n", (unsigned long)cumulative_stats.packet_len[4]);
|
||||
printf("\tPacket Len > 1500: %-13lu\n", (unsigned long)cumulative_stats.packet_len[5]);
|
||||
|
||||
if(processing_time_usec > 0) {
|
||||
if(tot_usec > 0) {
|
||||
char buf[32], buf1[32], when[64];
|
||||
float t = (float)(cumulative_stats.ip_packet_count*1000000)/(float)processing_time_usec;
|
||||
float b = (float)(cumulative_stats.total_wire_bytes * 8 *1000000)/(float)processing_time_usec;
|
||||
float t = (float)(cumulative_stats.ip_packet_count*1000000)/(float)tot_usec;
|
||||
float b = (float)(cumulative_stats.total_wire_bytes * 8 *1000000)/(float)tot_usec;
|
||||
float traffic_duration;
|
||||
|
||||
if(live_capture) traffic_duration = processing_time_usec;
|
||||
if(live_capture) traffic_duration = tot_usec;
|
||||
else traffic_duration = (pcap_end.tv_sec*1000000 + pcap_end.tv_usec) - (pcap_start.tv_sec*1000000 + pcap_start.tv_usec);
|
||||
|
||||
printf("\tnDPI throughput: %s pps / %s/sec\n", formatPackets(t, buf), formatTraffic(b, 1, buf1));
|
||||
t = (float)(cumulative_stats.ip_packet_count*1000000)/(float)traffic_duration;
|
||||
b = (float)(cumulative_stats.total_wire_bytes * 8 *1000000)/(float)traffic_duration;
|
||||
@@ -2004,7 +2017,7 @@ static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_us
|
||||
strftime(when, sizeof(when), "%d/%b/%Y %H:%M:%S", localtime(&pcap_end.tv_sec));
|
||||
printf("\tAnalysis end: %s\n", when);
|
||||
printf("\tTraffic throughput: %s pps / %s/sec\n", formatPackets(t, buf), formatTraffic(b, 1, buf1));
|
||||
printf("\tTraffic duration: %.3f sec\n", traffic_duration/1000000);
|
||||
printf("\tTraffic duration: %.3f sec\n", traffic_duration/1000000);
|
||||
}
|
||||
|
||||
if(enable_protocol_guess)
|
||||
@@ -2253,13 +2266,9 @@ free_stats:
|
||||
* @brief Force a pcap_dispatch() or pcap_loop() call to return
|
||||
*/
|
||||
static void breakPcapLoop(u_int16_t thread_id) {
|
||||
#ifdef USE_DPDK
|
||||
dpdk_run_capture = 0;
|
||||
#else
|
||||
if(ndpi_thread_info[thread_id].workflow->pcap_handle != NULL) {
|
||||
pcap_breakloop(ndpi_thread_info[thread_id].workflow->pcap_handle);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2326,26 +2335,15 @@ static void configurePcapHandle(pcap_t * pcap_handle) {
|
||||
* @brief Open a pcap file or a specified device - Always returns a valid pcap_t
|
||||
*/
|
||||
static pcap_t * openPcapFileOrDevice(u_int16_t thread_id, const u_char * pcap_file) {
|
||||
|
||||
u_int snaplen = 1536;
|
||||
int promisc = 1;
|
||||
char pcap_error_buffer[PCAP_ERRBUF_SIZE];
|
||||
pcap_t * pcap_handle = NULL;
|
||||
|
||||
/* trying to open a live interface */
|
||||
#ifdef USE_DPDK
|
||||
struct rte_mempool *mbuf_pool = rte_pktmbuf_pool_create("MBUF_POOL", NUM_MBUFS,
|
||||
MBUF_CACHE_SIZE, 0,
|
||||
RTE_MBUF_DEFAULT_BUF_SIZE,
|
||||
rte_socket_id());
|
||||
|
||||
if(mbuf_pool == NULL)
|
||||
rte_exit(EXIT_FAILURE, "Cannot create mbuf pool: are hugepages ok?\n");
|
||||
|
||||
if(dpdk_port_init(dpdk_port_id, mbuf_pool) != 0)
|
||||
rte_exit(EXIT_FAILURE, "DPDK: Cannot init port %u: please see README.dpdk\n", dpdk_port_id);
|
||||
#else
|
||||
if((pcap_handle = pcap_open_live((char*)pcap_file, snaplen,
|
||||
promisc, 500, pcap_error_buffer)) == NULL) {
|
||||
if((pcap_handle = pcap_open_live((char*)pcap_file, snaplen, promisc,
|
||||
500, pcap_error_buffer)) == NULL) {
|
||||
capture_for = capture_until = 0;
|
||||
|
||||
live_capture = 0;
|
||||
@@ -2372,17 +2370,11 @@ static pcap_t * openPcapFileOrDevice(u_int16_t thread_id, const u_char * pcap_fi
|
||||
} else {
|
||||
live_capture = 1;
|
||||
|
||||
if((!json_flag) && (!quiet_mode)) {
|
||||
#ifdef USE_DPDK
|
||||
printf("Capturing from DPDK (port 0)...\n");
|
||||
#else
|
||||
if((!json_flag) && (!quiet_mode))
|
||||
printf("Capturing live traffic from device %s...\n", pcap_file);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
configurePcapHandle(pcap_handle);
|
||||
#endif /* !DPDK */
|
||||
|
||||
if(capture_for > 0) {
|
||||
if((!json_flag) && (!quiet_mode))
|
||||
@@ -2400,7 +2392,7 @@ static pcap_t * openPcapFileOrDevice(u_int16_t thread_id, const u_char * pcap_fi
|
||||
/**
|
||||
* @brief Check pcap packet
|
||||
*/
|
||||
static void ndpi_process_packet(u_char *args,
|
||||
static void pcap_process_packet(u_char *args,
|
||||
const struct pcap_pkthdr *header,
|
||||
const u_char *packet) {
|
||||
struct ndpi_proto p;
|
||||
@@ -2489,16 +2481,16 @@ static void ndpi_process_packet(u_char *args,
|
||||
if(memcmp(packet, packet_checked, header->caplen) != 0)
|
||||
printf("INTERNAL ERROR: ingress packet was modified by nDPI: this should not happen [thread_id=%u, packetId=%lu, caplen=%u]\n",
|
||||
thread_id, (unsigned long)ndpi_thread_info[thread_id].workflow->stats.raw_packet_count, header->caplen);
|
||||
|
||||
free(packet_checked);
|
||||
|
||||
if((pcap_end.tv_sec-pcap_start.tv_sec) > pcap_analysis_duration) {
|
||||
int i;
|
||||
u_int64_t processing_time_usec, setup_time_usec;
|
||||
u_int64_t tot_usec;
|
||||
|
||||
gettimeofday(&end, NULL);
|
||||
processing_time_usec = end.tv_sec*1000000 + end.tv_usec - (begin.tv_sec*1000000 + begin.tv_usec);
|
||||
setup_time_usec = begin.tv_sec*1000000 + begin.tv_usec - (startup_time.tv_sec*1000000 + startup_time.tv_usec);
|
||||
|
||||
printResults(processing_time_usec, setup_time_usec);
|
||||
tot_usec = end.tv_sec*1000000 + end.tv_usec - (begin.tv_sec*1000000 + begin.tv_usec);
|
||||
|
||||
printResults(tot_usec);
|
||||
|
||||
for(i=0; i<ndpi_thread_info[thread_id].workflow->prefs.num_roots; i++) {
|
||||
ndpi_tdestroy(ndpi_thread_info[thread_id].workflow->ndpi_flows_root[i], ndpi_flow_info_freer);
|
||||
@@ -2513,12 +2505,6 @@ static void ndpi_process_packet(u_char *args,
|
||||
memcpy(&begin, &end, sizeof(begin));
|
||||
memcpy(&pcap_start, &pcap_end, sizeof(pcap_start));
|
||||
}
|
||||
|
||||
/*
|
||||
Leave the free as last statement to avoid crashes when ndpi_detection_giveup()
|
||||
is called above by printResults()
|
||||
*/
|
||||
free(packet_checked);
|
||||
}
|
||||
|
||||
|
||||
@@ -2527,20 +2513,20 @@ static void ndpi_process_packet(u_char *args,
|
||||
*/
|
||||
static void runPcapLoop(u_int16_t thread_id) {
|
||||
if((!shutdown_app) && (ndpi_thread_info[thread_id].workflow->pcap_handle != NULL))
|
||||
pcap_loop(ndpi_thread_info[thread_id].workflow->pcap_handle, -1, &ndpi_process_packet, (u_char*)&thread_id);
|
||||
pcap_loop(ndpi_thread_info[thread_id].workflow->pcap_handle, -1, &pcap_process_packet, (u_char*)&thread_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Process a running thread
|
||||
*/
|
||||
void * processing_thread(void *_thread_id) {
|
||||
|
||||
long thread_id = (long) _thread_id;
|
||||
char pcap_error_buffer[PCAP_ERRBUF_SIZE];
|
||||
|
||||
#if defined(linux) && defined(HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
if(core_affinity[thread_id] >= 0) {
|
||||
cpu_set_t cpuset;
|
||||
|
||||
CPU_ZERO(&cpuset);
|
||||
CPU_SET(core_affinity[thread_id], &cpuset);
|
||||
|
||||
@@ -2553,33 +2539,6 @@ void * processing_thread(void *_thread_id) {
|
||||
#endif
|
||||
if((!json_flag) && (!quiet_mode)) printf("Running thread %ld...\n", thread_id);
|
||||
|
||||
#ifdef USE_DPDK
|
||||
while(dpdk_run_capture) {
|
||||
struct rte_mbuf *bufs[BURST_SIZE];
|
||||
u_int16_t num = rte_eth_rx_burst(dpdk_port_id, 0, bufs, BURST_SIZE);
|
||||
u_int i;
|
||||
|
||||
if(num == 0) {
|
||||
usleep(1);
|
||||
continue;
|
||||
}
|
||||
|
||||
for(i = 0; i < PREFETCH_OFFSET && i < num; i++)
|
||||
rte_prefetch0(rte_pktmbuf_mtod(bufs[i], void *));
|
||||
|
||||
for(i = 0; i < num; i++) {
|
||||
char *data = rte_pktmbuf_mtod(bufs[i], char *);
|
||||
int len = rte_pktmbuf_pkt_len(bufs[i]);
|
||||
struct pcap_pkthdr h;
|
||||
|
||||
h.len = h.caplen = len;
|
||||
gettimeofday(&h.ts, NULL);
|
||||
|
||||
ndpi_process_packet((u_char*)&thread_id, &h, (const u_char *)data);
|
||||
rte_pktmbuf_free(bufs[i]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
pcap_loop:
|
||||
runPcapLoop(thread_id);
|
||||
|
||||
@@ -2592,7 +2551,6 @@ pcap_loop:
|
||||
goto pcap_loop;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -2603,7 +2561,7 @@ pcap_loop:
|
||||
*/
|
||||
void test_lib() {
|
||||
struct timeval end;
|
||||
u_int64_t processing_time_usec, setup_time_usec;
|
||||
u_int64_t tot_usec;
|
||||
long thread_id;
|
||||
|
||||
#ifdef HAVE_JSON_C
|
||||
@@ -2655,11 +2613,10 @@ void test_lib() {
|
||||
}
|
||||
|
||||
gettimeofday(&end, NULL);
|
||||
processing_time_usec = end.tv_sec*1000000 + end.tv_usec - (begin.tv_sec*1000000 + begin.tv_usec);
|
||||
setup_time_usec = begin.tv_sec*1000000 + begin.tv_usec - (startup_time.tv_sec*1000000 + startup_time.tv_usec);
|
||||
tot_usec = end.tv_sec*1000000 + end.tv_usec - (begin.tv_sec*1000000 + begin.tv_usec);
|
||||
|
||||
/* Printing cumulative results */
|
||||
printResults(processing_time_usec, setup_time_usec);
|
||||
printResults(tot_usec);
|
||||
|
||||
if(stats_flag) {
|
||||
#ifdef HAVE_JSON_C
|
||||
@@ -2678,7 +2635,7 @@ void test_lib() {
|
||||
void automataUnitTest() {
|
||||
void *automa;
|
||||
|
||||
assert((automa = ndpi_init_automa()));
|
||||
assert(automa = ndpi_init_automa());
|
||||
assert(ndpi_add_string_to_automa(automa, "hello") == 0);
|
||||
assert(ndpi_add_string_to_automa(automa, "world") == 0);
|
||||
ndpi_finalize_automa(automa);
|
||||
@@ -2906,7 +2863,7 @@ float getAverage(struct json_object *jObj_stat, char *field){
|
||||
float average;
|
||||
float sum = 0;
|
||||
int r;
|
||||
int j = 0;
|
||||
int j;
|
||||
|
||||
if((r = strcmp(field, "top.scanner.stats")) == 0) {
|
||||
for(j=0; j<json_object_array_length(jObj_stat); j++) {
|
||||
@@ -3272,8 +3229,8 @@ int orginal_main(int argc, char **argv) {
|
||||
#else
|
||||
int main(int argc, char **argv) {
|
||||
#endif
|
||||
int i;
|
||||
|
||||
int i;
|
||||
|
||||
if(ndpi_get_api_version() != NDPI_API_VERSION) {
|
||||
printf("nDPI Library version mismatch: please make sure this code and the nDPI library are in sync\n");
|
||||
return(-1);
|
||||
@@ -3281,10 +3238,8 @@ int orginal_main(int argc, char **argv) {
|
||||
|
||||
automataUnitTest();
|
||||
|
||||
gettimeofday(&startup_time, NULL);
|
||||
ndpi_info_mod = ndpi_init_detection_module();
|
||||
|
||||
if(ndpi_info_mod == NULL) return -1;
|
||||
if (ndpi_info_mod == NULL) return -1;
|
||||
|
||||
memset(ndpi_thread_info, 0, sizeof(ndpi_thread_info));
|
||||
|
||||
|
||||
+16
-71
@@ -74,8 +74,6 @@
|
||||
#include "ndpi_main.h"
|
||||
#include "ndpi_util.h"
|
||||
|
||||
extern u_int8_t enable_protocol_guess;
|
||||
|
||||
/* ***************************************************** */
|
||||
|
||||
void ndpi_free_flow_info_half(struct ndpi_flow_info *flow) {
|
||||
@@ -221,7 +219,7 @@ void ndpi_flow_info_freer(void *node) {
|
||||
/* ***************************************************** */
|
||||
|
||||
void ndpi_workflow_free(struct ndpi_workflow * workflow) {
|
||||
u_int i;
|
||||
int i;
|
||||
|
||||
for(i=0; i<workflow->prefs.num_roots; i++)
|
||||
ndpi_tdestroy(workflow->ndpi_flows_root[i], ndpi_flow_info_freer);
|
||||
@@ -234,8 +232,8 @@ void ndpi_workflow_free(struct ndpi_workflow * workflow) {
|
||||
/* ***************************************************** */
|
||||
|
||||
int ndpi_workflow_node_cmp(const void *a, const void *b) {
|
||||
const struct ndpi_flow_info *fa = (const struct ndpi_flow_info*)a;
|
||||
const struct ndpi_flow_info *fb = (const struct ndpi_flow_info*)b;
|
||||
struct ndpi_flow_info *fa = (struct ndpi_flow_info*)a;
|
||||
struct ndpi_flow_info *fb = (struct ndpi_flow_info*)b;
|
||||
|
||||
if(fa->hashval < fb->hashval) return(-1); else if(fa->hashval > fb->hashval) return(1);
|
||||
|
||||
@@ -309,7 +307,7 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
||||
u_int32_t idx, l4_offset, hashval;
|
||||
struct ndpi_flow_info flow;
|
||||
void *ret;
|
||||
const u_int8_t *l3, *l4;
|
||||
u_int8_t *l3, *l4;
|
||||
|
||||
/*
|
||||
Note: to keep things simple (ndpiReader is just a demo app)
|
||||
@@ -324,10 +322,10 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
||||
return NULL;
|
||||
|
||||
l4_offset = iph->ihl * 4;
|
||||
l3 = (const u_int8_t*)iph;
|
||||
l3 = (u_int8_t*)iph;
|
||||
} else {
|
||||
l4_offset = sizeof(struct ndpi_ipv6hdr);
|
||||
l3 = (const u_int8_t*)iph6;
|
||||
l3 = (u_int8_t*)iph6;
|
||||
}
|
||||
|
||||
if(l4_packet_len < 64)
|
||||
@@ -347,7 +345,7 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
||||
workflow->stats.max_packet_len = l4_packet_len;
|
||||
|
||||
*proto = iph->protocol;
|
||||
l4 = ((const u_int8_t *) l3 + l4_offset);
|
||||
l4 = ((u_int8_t *) l3 + l4_offset);
|
||||
|
||||
if(iph->protocol == IPPROTO_TCP && l4_packet_len >= 20) {
|
||||
u_int tcp_len;
|
||||
@@ -357,7 +355,7 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
||||
*tcph = (struct ndpi_tcphdr *)l4;
|
||||
*sport = ntohs((*tcph)->source), *dport = ntohs((*tcph)->dest);
|
||||
tcp_len = ndpi_min(4*(*tcph)->doff, l4_packet_len);
|
||||
*payload = (u_int8_t*)&l4[tcp_len];
|
||||
*payload = &l4[tcp_len];
|
||||
*payload_len = ndpi_max(0, l4_packet_len-4*(*tcph)->doff);
|
||||
} else if(iph->protocol == IPPROTO_UDP && l4_packet_len >= 8) {
|
||||
// udp
|
||||
@@ -365,8 +363,8 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
||||
workflow->stats.udp_count++;
|
||||
*udph = (struct ndpi_udphdr *)l4;
|
||||
*sport = ntohs((*udph)->source), *dport = ntohs((*udph)->dest);
|
||||
*payload = (u_int8_t*)&l4[sizeof(struct ndpi_udphdr)];
|
||||
*payload_len = (l4_packet_len > sizeof(struct ndpi_udphdr)) ? l4_packet_len-sizeof(struct ndpi_udphdr) : 0;
|
||||
*payload = &l4[sizeof(struct ndpi_udphdr)];
|
||||
*payload_len = ndpi_max(0, l4_packet_len-sizeof(struct ndpi_udphdr));
|
||||
} else {
|
||||
// non tcp/udp protocols
|
||||
*sport = *dport = 0;
|
||||
@@ -509,7 +507,7 @@ static struct ndpi_flow_info *get_ndpi_flow_info6(struct ndpi_workflow * workflo
|
||||
iph.protocol = iph6->ip6_hdr.ip6_un1_nxt;
|
||||
|
||||
if(iph.protocol == IPPROTO_DSTOPTS /* IPv6 destination option */) {
|
||||
const u_int8_t *options = (const u_int8_t*)iph6 + sizeof(const struct ndpi_ipv6hdr);
|
||||
u_int8_t *options = (u_int8_t*)iph6 + sizeof(const struct ndpi_ipv6hdr);
|
||||
|
||||
iph.protocol = options[0];
|
||||
}
|
||||
@@ -532,7 +530,7 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
|
||||
|
||||
/* BITTORRENT */
|
||||
if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_BITTORRENT) {
|
||||
u_int i, j, n = 0;
|
||||
int i, j, n = 0;
|
||||
|
||||
for(i=0, j = 0; j < sizeof(flow->bittorent_hash)-1; i++) {
|
||||
sprintf(&flow->bittorent_hash[j], "%02x",
|
||||
@@ -679,9 +677,8 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|
||||
flow->check_extra_packets = 1;
|
||||
|
||||
if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN)
|
||||
flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow,
|
||||
enable_protocol_guess);
|
||||
|
||||
flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct,
|
||||
flow->ndpi_flow);
|
||||
process_ndpi_collected_info(workflow, flow);
|
||||
}
|
||||
|
||||
@@ -754,14 +751,8 @@ struct ndpi_proto ndpi_workflow_process_packet (struct ndpi_workflow * workflow,
|
||||
workflow->last_time = time;
|
||||
|
||||
/*** check Data Link type ***/
|
||||
int datalink_type;
|
||||
const int datalink_type = pcap_datalink(workflow->pcap_handle);
|
||||
|
||||
#ifdef USE_DPDK
|
||||
datalink_type = DLT_EN10MB;
|
||||
#else
|
||||
datalink_type = (int)pcap_datalink(workflow->pcap_handle);
|
||||
#endif
|
||||
|
||||
datalink_check:
|
||||
switch(datalink_type) {
|
||||
case DLT_NULL:
|
||||
@@ -1044,7 +1035,7 @@ iph_check:
|
||||
static uint32_t crc32_for_byte(uint32_t r) {
|
||||
int j;
|
||||
for(j = 0; j < 8; ++j)
|
||||
r = ((r & 1) ? 0 : (uint32_t)0xEDB88320L) ^ r >> 1;
|
||||
r = (r & 1? 0: (uint32_t)0xEDB88320L) ^ r >> 1;
|
||||
return r ^ (uint32_t)0xFF000000L;
|
||||
}
|
||||
|
||||
@@ -1085,49 +1076,3 @@ u_int32_t ethernet_crc32(const void* data, size_t n_bytes) {
|
||||
__crc32(data, n_bytes, &crc);
|
||||
return crc;
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
#ifdef USE_DPDK
|
||||
|
||||
static const struct rte_eth_conf port_conf_default = {
|
||||
.rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN }
|
||||
};
|
||||
|
||||
/* ************************************ */
|
||||
|
||||
int dpdk_port_init(int port, struct rte_mempool *mbuf_pool) {
|
||||
struct rte_eth_conf port_conf = port_conf_default;
|
||||
const u_int16_t rx_rings = 1, tx_rings = 1;
|
||||
int retval;
|
||||
u_int16_t q;
|
||||
|
||||
/* 1 RX queue */
|
||||
retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
|
||||
|
||||
if(retval != 0)
|
||||
return retval;
|
||||
|
||||
for (q = 0; q < rx_rings; q++) {
|
||||
retval = rte_eth_rx_queue_setup(port, q, RX_RING_SIZE, rte_eth_dev_socket_id(port), NULL, mbuf_pool);
|
||||
if(retval < 0)
|
||||
return retval;
|
||||
}
|
||||
|
||||
for (q = 0; q < tx_rings; q++) {
|
||||
retval = rte_eth_tx_queue_setup(port, q, TX_RING_SIZE, rte_eth_dev_socket_id(port), NULL);
|
||||
if(retval < 0)
|
||||
return retval;
|
||||
}
|
||||
|
||||
retval = rte_eth_dev_start(port);
|
||||
|
||||
if(retval < 0)
|
||||
return retval;
|
||||
|
||||
rte_eth_promiscuous_enable(port);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+1
-19
@@ -31,24 +31,6 @@
|
||||
|
||||
#include <pcap.h>
|
||||
|
||||
#ifdef USE_DPDK
|
||||
#include <rte_eal.h>
|
||||
#include <rte_ether.h>
|
||||
#include <rte_ethdev.h>
|
||||
#include <rte_cycles.h>
|
||||
#include <rte_lcore.h>
|
||||
#include <rte_mbuf.h>
|
||||
|
||||
#define RX_RING_SIZE 128
|
||||
#define TX_RING_SIZE 512
|
||||
#define NUM_MBUFS 8191
|
||||
#define MBUF_CACHE_SIZE 250
|
||||
#define BURST_SIZE 32
|
||||
#define PREFETCH_OFFSET 3
|
||||
|
||||
extern int dpdk_port_init(int port, struct rte_mempool *mbuf_pool);
|
||||
#endif
|
||||
|
||||
#define MAX_NUM_READER_THREADS 16
|
||||
#define IDLE_SCAN_PERIOD 10 /* msec (use TICK_RESOLUTION = 1000) */
|
||||
#define MAX_IDLE_TIME 30000
|
||||
@@ -97,7 +79,7 @@ typedef struct ndpi_flow_info {
|
||||
char bittorent_hash[41];
|
||||
|
||||
struct {
|
||||
char client_info[64], server_info[64];
|
||||
char client_info[48], server_info[48];
|
||||
} ssh_ssl;
|
||||
|
||||
void *src_id, *dst_id;
|
||||
|
||||
+1
-1
@@ -7,4 +7,4 @@ Name: libndpi
|
||||
Description: deep packet inspection library
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lndpi
|
||||
Cflags: -I${includedir}/ndpi
|
||||
Cflags: -I${includedir}/libndpi-@VERSION@
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
ndpi_dump_protocols
|
||||
ndpi_strnstr
|
||||
ndpi_detection_giveup
|
||||
ndpi_get_proto_name
|
||||
ndpi_free
|
||||
ndpi_flow_free
|
||||
ndpi_guess_undetected_protocol
|
||||
ndpi_tfind
|
||||
ndpi_tsearch
|
||||
ndpi_set_protocol_detection_bitmask2
|
||||
ndpi_detection_get_sizeof_ndpi_id_struct
|
||||
ndpi_detection_get_sizeof_ndpi_flow_struct
|
||||
ndpi_load_protocols_file
|
||||
ndpi_tdestroy
|
||||
ndpi_exit_detection_module
|
||||
ndpi_l4_detection_process_packet
|
||||
ndpi_detection_process_packet
|
||||
ndpi_process_extra_packet
|
||||
ndpi_twalk
|
||||
ndpi_tdelete
|
||||
ndpi_revision
|
||||
ndpi_init_detection_module
|
||||
ndpi_get_num_supported_protocols
|
||||
ndpi_set_proto_defaults
|
||||
ndpi_get_protocol_id
|
||||
ndpi_get_category_id
|
||||
ndpi_find_port_based_protocol
|
||||
ndpi_get_http_method
|
||||
ndpi_get_http_url
|
||||
ndpi_get_http_content_type
|
||||
ndpi_free_flow
|
||||
ndpi_get_proto_breed
|
||||
ndpi_get_proto_breed_name
|
||||
ndpi_get_proto_by_id
|
||||
ndpi_get_proto_by_name
|
||||
ndpi_get_protocol_id_master_proto
|
||||
ndpi_guess_protocol_id
|
||||
ndpi_protocol2name
|
||||
ndpi_get_lower_proto
|
||||
ndpi_is_proto
|
||||
ndpi_malloc
|
||||
ndpi_calloc
|
||||
ndpi_set_detected_protocol
|
||||
ndpi_match_string_subprotocol
|
||||
ndpi_init_automa
|
||||
ndpi_free_automa
|
||||
ndpi_add_string_value_to_automa
|
||||
ndpi_add_string_to_automa
|
||||
ndpi_finalize_automa
|
||||
ndpi_match_string
|
||||
ndpi_match_string_id
|
||||
set_ndpi_malloc
|
||||
set_ndpi_flow_malloc
|
||||
set_ndpi_free
|
||||
set_ndpi_flow_free
|
||||
set_ndpi_debug_function
|
||||
ndpi_category_str
|
||||
ndpi_get_proto_category
|
||||
ndpi_netbios_name_interpret
|
||||
ndpi_category_set_name
|
||||
ndpi_category_get_name
|
||||
ndpi_is_custom_category
|
||||
ndpi_is_subprotocol_informative
|
||||
ndpi_set_proto_category
|
||||
ndpi_get_api_version
|
||||
ndpi_network_ptree_match
|
||||
ndpi_check_flow_func
|
||||
ndpi_fill_protocol_category
|
||||
ndpi_load_hostname_category
|
||||
ndpi_enable_loaded_categories
|
||||
ndpi_set_detection_preferences
|
||||
ndpi_get_proto_defaults
|
||||
ndpi_get_ndpi_num_supported_protocols
|
||||
ndpi_get_ndpi_num_custom_protocols
|
||||
ndpi_get_ndpi_detection_module_size
|
||||
@@ -1 +0,0 @@
|
||||
ubuntu
|
||||
@@ -1 +0,0 @@
|
||||
/usr/local/lib
|
||||
@@ -1,59 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2018 - ntop.org
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libndpi
|
||||
PKG_VERSION:=1333.ab2f3ce
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/ntop/nDPI.git
|
||||
PKG_SOURCE_VERSION:=ab2f3cefc89017d73e67faa4eb4011e7e3f2044d
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
PKG_MAINTAINER:=Emanuele Faranda <faranda@ntop.org>
|
||||
PKG_LICENSE:=GPL3
|
||||
PKG_BUILD_DEPENDS:=+libpcap
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
# autogen fix
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libndpi
|
||||
SECTION:=network
|
||||
CATEGORY:=Network
|
||||
#DEPENDS:=+libc +libjson-c +libpthread
|
||||
TITLE:=nDPI Deep Packet Inspection Library
|
||||
URL:=https://www.ntop.org
|
||||
endef
|
||||
|
||||
define Package/libndpi/description
|
||||
Open and Extensible GPLv3 Deep Packet Inspection Library
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-pic \
|
||||
--disable-json-c \
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( cd $(PKG_BUILD_DIR); ./autogen.sh )
|
||||
$(call Build/Configure/Default)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/local/include/libndpi
|
||||
$(CP) $(PKG_BUILD_DIR)/src/include/* $(STAGING_DIR)/usr/local/include/libndpi
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/local/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.* $(STAGING_DIR)/usr/local/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libndpi))
|
||||
@@ -1,38 +0,0 @@
|
||||
#
|
||||
# RPM Build Process
|
||||
#
|
||||
APPL=ndpi
|
||||
PLATFORM=@PLATFORM@
|
||||
GIT_REVISION=@GIT_REVISION@
|
||||
PACKAGE_VERSION=@PACKAGE_VERSION@
|
||||
PACKAGE=$(APPL)-$(PACKAGE_VERSION)-$(GIT_REVISION).$(PLATFORM).rpm
|
||||
DEV_PACKAGE=$(APPL)-dev-$(PACKAGE_VERSION)-$(GIT_REVISION).$(PLATFORM).rpm
|
||||
PACKAGE_PATH=$(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(PACKAGE)
|
||||
|
||||
package: build-rpm
|
||||
|
||||
build-src:
|
||||
cd ../..; ./autogen.sh; ./configure; make clean; make
|
||||
|
||||
cleanup-rpm:
|
||||
rm -rf $(HOME)/rpmbuild/BUILD/ndpi* $(HOME)/rpmbuild/SOURCES/ndpi*
|
||||
|
||||
build-rpm: build-src cleanup-rpm
|
||||
-rm -rf ndpi-@PACKAGE_VERSION@
|
||||
mkdir -p ndpi-@PACKAGE_VERSION@/packages
|
||||
cp ndpi.spec.in ndpi-@PACKAGE_VERSION@/packages
|
||||
cp ../../Makefile.* ../../libtool ../../configure* ../../config.* ../../install-sh ../../autogen.sh ndpi-@PACKAGE_VERSION@
|
||||
cp -rf ../../src ndpi-@PACKAGE_VERSION@
|
||||
cp ../../CHANGELOG.md ../../COPYING ndpi-@PACKAGE_VERSION@
|
||||
\rm -f ndpi-@PACKAGE_VERSION@/config.status
|
||||
mkdir -p $(HOME)/rpmbuild/SOURCES
|
||||
tar cvfz $(HOME)/rpmbuild/SOURCES/ndpi-@PACKAGE_VERSION@.tgz ndpi-@PACKAGE_VERSION@
|
||||
@rm -f $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(PACKAGE)
|
||||
@rpmbuild -bb ./$(APPL).spec --define "buildnumber $(GIT_REVISION)"
|
||||
@if [[ $EUID -ne 0 ]]; then ./rpm-sign.exp $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(PACKAGE); fi
|
||||
@if [[ $EUID -ne 0 ]]; then ./rpm-sign.exp $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(DEV_PACKAGE); fi
|
||||
@echo ""
|
||||
@echo "Package contents:"
|
||||
@rpm -qpl $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(PACKAGE)
|
||||
@echo "The package is now available in $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(PACKAGE)"
|
||||
|
||||
Vendored
-2869
File diff suppressed because it is too large
Load Diff
@@ -1,44 +0,0 @@
|
||||
AC_INIT([Makefile.in], 1.0)
|
||||
|
||||
DATE=`date -R`
|
||||
KERNEL=`uname -r`
|
||||
PLATFORM=`uname -p`
|
||||
MACHINE=`uname -m`
|
||||
SHORT_MACHINE=`uname -m | cut -b1-3`
|
||||
|
||||
EXTN=""
|
||||
if test $MACHINE = "x86_64"; then
|
||||
EXTN="amd64"
|
||||
else
|
||||
if test $SHORT_MACHINE = "aar"; then
|
||||
EXTN="arm64"
|
||||
else
|
||||
if test $SHORT_MACHINE = "arm"; then
|
||||
EXTN="armhf"
|
||||
else
|
||||
if test $SHORT_MACHINE = "mip"; then
|
||||
EXTN="mips"
|
||||
else
|
||||
EXTN="i386"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
PACKAGE_VERSION=`../version.sh --release`
|
||||
MAJOR_RELEASE=`../version.sh --major-release`
|
||||
GIT_REVISION=`../version.sh --revision`
|
||||
|
||||
AC_CONFIG_FILES([Makefile ndpi.spec])
|
||||
|
||||
AC_SUBST(PACKAGE_VERSION)
|
||||
AC_SUBST(PLATFORM)
|
||||
AC_SUBST(MACHINE)
|
||||
AC_SUBST(EXTN)
|
||||
AC_SUBST(DATE)
|
||||
AC_SUBST(KERNEL)
|
||||
AC_SUBST(GIT_REVISION)
|
||||
AC_SUBST(MAJOR_RELEASE)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
Summary: L7 DPI library
|
||||
Name: ndpi
|
||||
Version: @PACKAGE_VERSION@
|
||||
Release: %{buildnumber}
|
||||
License: LGPL
|
||||
Group: Networking/Utilities
|
||||
Conflicts: nprobe-dev
|
||||
URL: http://www.ntop.org/products/deep-packet-inspection/ndpi/
|
||||
Source: ndpi-%{version}.tgz
|
||||
Packager: Luca Deri <deri@ntop.org>
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
%{?el7:Requires: glibc >= 2.3.4 numactl coreutils }
|
||||
%{?el6:Requires: glibc >= 2.3.4 numactl coreutils }
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
nDPI Open and Extensible LGPLv3 Deep Packet Inspection Library.
|
||||
|
||||
%package dev
|
||||
Summary: Header files and development libraries for %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description dev
|
||||
This package contains the header files and development libraries
|
||||
for %{name}. If you like to develop programs using %{name},
|
||||
you will need to install %{name}-dev.
|
||||
|
||||
%prep
|
||||
|
||||
%setup -q
|
||||
|
||||
# Execution order:
|
||||
# install: pre -> (copy) -> post
|
||||
# upgrade: pre -> (copy) -> post -> preun (old) -> (delete old) -> postun (old)
|
||||
# un-install: preun -> (delete) -> postun
|
||||
|
||||
%pre
|
||||
|
||||
%post
|
||||
|
||||
%build
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
%define includedir /usr/local/include/ndpi
|
||||
%define libdir /usr/local/lib
|
||||
%define bindir /usr/local/bin
|
||||
|
||||
%install
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
if [ -d $RPM_BUILD_ROOT ]; then
|
||||
\rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
mkdir -p $RPM_BUILD_ROOT%{includedir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{libdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{bindir}
|
||||
cd $HOME/nDPI; make DESTDIR=$RPM_BUILD_ROOT install;
|
||||
rm $RPM_BUILD_ROOT%{libdir}/libndpi.so
|
||||
rm $RPM_BUILD_ROOT%{libdir}/libndpi.so.?
|
||||
cd $RPM_BUILD_ROOT%{libdir}/; ln -s libndpi.so.@PACKAGE_VERSION@ libndpi.so.@MAJOR_RELEASE@; cd -
|
||||
cd $RPM_BUILD_ROOT%{libdir}/; ln -s libndpi.so.@PACKAGE_VERSION@ libndpi.so; cd -
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||
cp $HOME/nDPI/packages/etc/ld.so.conf.d/ndpi.conf $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||
strip $RPM_BUILD_ROOT%{bindir}/*
|
||||
rm -fr %{buildroot}%{includedir}/ndpi_win32.h
|
||||
|
||||
%clean
|
||||
rm -fr $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
|
||||
/usr/local/lib/libndpi.so
|
||||
/usr/local/lib/libndpi.so.@MAJOR_RELEASE@
|
||||
/usr/local/lib/libndpi.so.@PACKAGE_VERSION@
|
||||
/usr/local/bin/ndpiReader
|
||||
/etc/ld.so.conf.d/ndpi.conf
|
||||
%{libdir}/pkgconfig/libndpi.pc
|
||||
|
||||
%preun
|
||||
|
||||
%files dev
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%{includedir}
|
||||
%{libdir}/libndpi.a
|
||||
|
||||
%changelog
|
||||
* Mon Nov 19 2018 Alfredo Cardigliano <cardigliano@ntop.org> 2.5
|
||||
- Initial package version
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/expect -f
|
||||
|
||||
### rpm-sign.exp -- Sign RPMs by sending the passphrase.
|
||||
|
||||
spawn rpm --addsign {*}$argv
|
||||
expect -exact "Enter pass phrase: "
|
||||
send -- "\r"
|
||||
expect eof
|
||||
|
||||
## end of rpm-sign.exp
|
||||
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# Change it according to your setup
|
||||
#
|
||||
NDPI_HOME=$(PWD)/../..
|
||||
NDPI_BUILD=${NDPI_HOME}/packages/ubuntu
|
||||
|
||||
all: clean ndpi
|
||||
|
||||
ndpi:
|
||||
\rm -rf ./usr ./debian/tmp ./debian/ndpi-dev
|
||||
mkdir -p ./usr/local ./debian/ndpi-dev
|
||||
mkdir -p ./usr/local/ndpi/lib ./usr/local/ndpi/bin ./ndpi-dev/usr/local/include/ndpi/
|
||||
cd ${NDPI_HOME}; ./autogen.sh; ./configure; make
|
||||
cp $(NDPI_HOME)/lib/libndpi.a $(NDPI_HOME)/lib/libndpi.so* ./usr/local/ndpi/lib/
|
||||
cp $(NDPI_HOME)/example/ndpiReader ./usr/local/ndpi/bin/
|
||||
cp $(NDPI_HOME)/src/include/*.h ndpi-dev/usr/local/include/ndpi/
|
||||
-rm -fr ndpi-dev/usr/local/include/nprobe/ndpi/.svn ndpi-dev/usr/local/include/ndpi/Makefile* ndpi-dev/usr/local/include/ndpi/ndpi_win32.h* ndpi-dev/usr/local/include/ndpi/include
|
||||
-find ./usr/local/lib -name "*.la" -exec /bin/rm {} ';'
|
||||
@echo
|
||||
@find . -name "*~" -exec /bin/rm {} ';'
|
||||
dpkg-buildpackage -rfakeroot -d -us -uc
|
||||
dpkg-sig --sign builder -k 7921DF34 ../ndpi*deb
|
||||
@\rm -f ../ndpi*dsc ../ndpi*.gz ../ndpi*changes
|
||||
@/bin/mv ../ndpi*deb .
|
||||
@echo
|
||||
@echo "Package built."
|
||||
@/bin/ls ndpi*deb
|
||||
@echo "-------------------------------"
|
||||
-dpkg --contents ndpi*amd64.deb
|
||||
@echo "-------------------------------"
|
||||
@echo "-------------------------------"
|
||||
-dpkg --contents ndpi*all.deb
|
||||
@echo "-------------------------------"
|
||||
|
||||
distclean:
|
||||
echo "dummy distclean"
|
||||
|
||||
install:
|
||||
echo "dummy install"
|
||||
|
||||
clean:
|
||||
-rm -rf *~ *deb debian/tmp ./usr
|
||||
+13
-17
@@ -7,33 +7,29 @@ NDPI_BUILD=${NDPI_HOME}/packages/ubuntu
|
||||
all: clean ndpi
|
||||
|
||||
ndpi:
|
||||
\rm -rf ./debian/ndpi-tmp ./debian/ndpi-dev-tmp ./debian/ndpi ./debian/ndpi-dev
|
||||
mkdir -p ./debian/ndpi-tmp ./debian/ndpi-dev-tmp
|
||||
mkdir -p ./debian/ndpi-tmp/usr/local/lib ./debian/ndpi-tmp/usr/local/bin
|
||||
mkdir -p ./debian/ndpi-dev-tmp/usr/local/lib ./debian/ndpi-dev-tmp/usr/local/include/ndpi
|
||||
\rm -rf ./usr ./debian/tmp ./debian/ndpi-dev
|
||||
mkdir -p ./usr/local ./debian/ndpi-dev
|
||||
mkdir -p ./usr/local/ndpi/lib ./usr/local/ndpi/bin ./ndpi-dev/usr/local/include/ndpi/
|
||||
cd ${NDPI_HOME}; ./autogen.sh; ./configure; make
|
||||
cp $(NDPI_HOME)/src/lib/libndpi.so.@NDPI_VERS@ ./debian/ndpi-tmp/usr/local/lib/
|
||||
cd ./debian/ndpi-tmp/usr/local/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so; cd -
|
||||
cd ./debian/ndpi-tmp/usr/local/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so.@MAJOR_RELEASE@; cd -
|
||||
cp $(NDPI_HOME)/src/lib/libndpi.a ./debian/ndpi-dev-tmp/usr/local/lib/
|
||||
cp $(NDPI_HOME)/example/ndpiReader ./debian/ndpi-tmp/usr/local/bin/
|
||||
cp $(NDPI_HOME)/src/include/*.h ./debian/ndpi-dev-tmp/usr/local/include/ndpi/
|
||||
-rm -fr ./debian/ndpi-dev-tmp/usr/local/include/ndpi/ndpi_win32.h*
|
||||
cp $(NDPI_HOME)/lib/libndpi.a $(NDPI_HOME)/lib/libndpi.so* ./usr/local/ndpi/lib/
|
||||
cp $(NDPI_HOME)/example/ndpiReader ./usr/local/ndpi/bin/
|
||||
cp $(NDPI_HOME)/src/include/*.h ndpi-dev/usr/local/include/ndpi/
|
||||
-rm -fr ndpi-dev/usr/local/include/nprobe/ndpi/.svn ndpi-dev/usr/local/include/ndpi/Makefile* ndpi-dev/usr/local/include/ndpi/ndpi_win32.h* ndpi-dev/usr/local/include/ndpi/include
|
||||
-find ./usr/local/lib -name "*.la" -exec /bin/rm {} ';'
|
||||
@echo
|
||||
@find ./debian/ndpi-tmp -name "*~" -exec /bin/rm {} ';'
|
||||
@find ./debian/ndpi-dev-tmp -name "*~" -exec /bin/rm {} ';'
|
||||
@find . -name "*~" -exec /bin/rm {} ';'
|
||||
dpkg-buildpackage -rfakeroot -d -us -uc
|
||||
dpkg-sig --sign builder -k D1EB60BE ../ndpi*deb
|
||||
dpkg-sig --sign builder -k 7921DF34 ../ndpi*deb
|
||||
@\rm -f ../ndpi*dsc ../ndpi*.gz ../ndpi*changes
|
||||
@/bin/mv ../ndpi*deb .
|
||||
@echo
|
||||
@echo "Package built."
|
||||
@/bin/ls ndpi*deb
|
||||
@echo "-------------------------------"
|
||||
-dpkg --contents ndpi_*.deb
|
||||
-dpkg --contents ndpi*amd64.deb
|
||||
@echo "-------------------------------"
|
||||
@echo "-------------------------------"
|
||||
-dpkg --contents ndpi-dev_*.deb
|
||||
-dpkg --contents ndpi*all.deb
|
||||
@echo "-------------------------------"
|
||||
|
||||
distclean:
|
||||
@@ -43,4 +39,4 @@ install:
|
||||
echo "dummy install"
|
||||
|
||||
clean:
|
||||
-rm -rf *~ *deb ./usr ./debian/ndpi ./debian/ndpi-dev ./debian/ndpi-tmp ./debian/ndpi-dev-tmp
|
||||
-rm -rf *~ *deb debian/tmp ./usr
|
||||
|
||||
Vendored
+21
-38
@@ -583,12 +583,13 @@ PACKAGE_URL=''
|
||||
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
MAJOR_RELEASE
|
||||
GIT_REVISION
|
||||
PFRING_SVN_RELEASE
|
||||
SVN_RELEASE
|
||||
KERNEL
|
||||
DATE
|
||||
EXTN
|
||||
MACHINE
|
||||
PFRING_VERS
|
||||
NDPI_VERS
|
||||
target_alias
|
||||
host_alias
|
||||
@@ -609,7 +610,6 @@ infodir
|
||||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
@@ -674,7 +674,6 @@ datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
@@ -927,15 +926,6 @@ do
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||
| --run | --ru | --r)
|
||||
ac_prev=runstatedir ;;
|
||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
| --run=* | --ru=* | --r=*)
|
||||
runstatedir=$ac_optarg ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
@@ -1073,7 +1063,7 @@ fi
|
||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir runstatedir
|
||||
libdir localedir mandir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
@@ -1226,7 +1216,6 @@ Fine tuning of the installation directories:
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
@@ -1681,35 +1670,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
DATE=`date -R`
|
||||
KERNEL=`uname -r`
|
||||
NDPI_VERS=`cat ../../config.h | grep -w VERSION | cut -d \" -f 2`
|
||||
PFRING_VERS=`cat $HOME/PF_RING/kernel/linux/pf_ring.h | grep RING_VERSION | head -1 | cut -d '"' -f 2`
|
||||
SVN_RELEASE=`svn info ../.. | grep "^Revision"|cut -d " " -f 2`
|
||||
PFRING_SVN_RELEASE=`svn info $HOME/PF_RING | grep "^Revision"|cut -d " " -f 2`
|
||||
MACHINE=`uname -m`
|
||||
SHORT_MACHINE=`uname -m | cut -b1-3`
|
||||
|
||||
EXTN=""
|
||||
if test $MACHINE = "x86_64"; then
|
||||
EXTN="amd64"
|
||||
EXTN="amd64"
|
||||
else
|
||||
if test $SHORT_MACHINE = "aar"; then
|
||||
EXTN="arm64"
|
||||
else
|
||||
if test $SHORT_MACHINE = "arm"; then
|
||||
EXTN="armhf"
|
||||
else
|
||||
if test $SHORT_MACHINE = "mip"; then
|
||||
EXTN="mips"
|
||||
else
|
||||
EXTN="i386"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
EXTN="i386"
|
||||
fi
|
||||
|
||||
NDPI_VERS=`../version.sh --release`
|
||||
MAJOR_RELEASE=`../version.sh --major-release`
|
||||
GIT_REVISION=`../version.sh --revision`
|
||||
|
||||
ac_config_files="$ac_config_files Makefile debian/changelog debian/files debian/control"
|
||||
DATE=`date -R`
|
||||
KERNEL=`uname -r`
|
||||
|
||||
|
||||
|
||||
@@ -1720,6 +1694,15 @@ ac_config_files="$ac_config_files Makefile debian/changelog debian/files debian/
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile"
|
||||
|
||||
ac_config_files="$ac_config_files debian/changelog"
|
||||
|
||||
ac_config_files="$ac_config_files debian/files"
|
||||
|
||||
ac_config_files="$ac_config_files debian/control"
|
||||
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
|
||||
@@ -1,41 +1,32 @@
|
||||
AC_INIT([Makefile.in], 1.0)
|
||||
|
||||
NDPI_VERS=`cat ../../config.h | grep -w VERSION | cut -d \" -f 2`
|
||||
PFRING_VERS=`cat $HOME/PF_RING/kernel/linux/pf_ring.h | grep RING_VERSION | head -1 | cut -d '"' -f 2`
|
||||
SVN_RELEASE=`svn info ../.. | grep "^Revision"|cut -d " " -f 2`
|
||||
PFRING_SVN_RELEASE=`svn info $HOME/PF_RING | grep "^Revision"|cut -d " " -f 2`
|
||||
MACHINE=`uname -m`
|
||||
|
||||
if test $MACHINE = "x86_64"; then
|
||||
EXTN="amd64"
|
||||
else
|
||||
EXTN="i386"
|
||||
fi
|
||||
|
||||
DATE=`date -R`
|
||||
KERNEL=`uname -r`
|
||||
MACHINE=`uname -m`
|
||||
SHORT_MACHINE=`uname -m | cut -b1-3`
|
||||
|
||||
EXTN=""
|
||||
if test $MACHINE = "x86_64"; then
|
||||
EXTN="amd64"
|
||||
else
|
||||
if test $SHORT_MACHINE = "aar"; then
|
||||
EXTN="arm64"
|
||||
else
|
||||
if test $SHORT_MACHINE = "arm"; then
|
||||
EXTN="armhf"
|
||||
else
|
||||
if test $SHORT_MACHINE = "mip"; then
|
||||
EXTN="mips"
|
||||
else
|
||||
EXTN="i386"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
NDPI_VERS=`../version.sh --release`
|
||||
MAJOR_RELEASE=`../version.sh --major-release`
|
||||
GIT_REVISION=`../version.sh --revision`
|
||||
|
||||
AC_CONFIG_FILES([Makefile debian/changelog debian/files debian/control])
|
||||
|
||||
AC_SUBST(NDPI_VERS)
|
||||
AC_SUBST(PFRING_VERS)
|
||||
AC_SUBST(MACHINE)
|
||||
AC_SUBST(EXTN)
|
||||
AC_SUBST(DATE)
|
||||
AC_SUBST(KERNEL)
|
||||
AC_SUBST(GIT_REVISION)
|
||||
AC_SUBST(MAJOR_RELEASE)
|
||||
AC_SUBST(SVN_RELEASE)
|
||||
AC_SUBST(PFRING_SVN_RELEASE)
|
||||
|
||||
AC_CONFIG_FILES(Makefile)
|
||||
AC_CONFIG_FILES(debian/changelog)
|
||||
AC_CONFIG_FILES(debian/files)
|
||||
AC_CONFIG_FILES(debian/control)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
This directory contains the files needed to build the package
|
||||
named 'ndpi' for the Debian GNU/Linux distribution.
|
||||
named 'nprobe' for the Debian GNU/Linux distribution.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ndpi (@NDPI_VERS@-@GIT_REVISION@) stable; urgency=high
|
||||
ndpi (@NDPI_VERS@-@SVN_RELEASE@) stable; urgency=high
|
||||
* Last packaged version
|
||||
|
||||
-- Luca Deri <deri@ntop.org> @DATE@
|
||||
|
||||
@@ -1 +1 @@
|
||||
9
|
||||
1
|
||||
|
||||
@@ -2,25 +2,27 @@ Source: ndpi
|
||||
Section: free
|
||||
Priority: optional
|
||||
Maintainer: Luca Deri <deri@ntop.org>
|
||||
Standards-Version: @NDPI_VERS@
|
||||
Standards-Version: @NDPI_VERSION@
|
||||
Build-Depends:
|
||||
Build-Conflicts:
|
||||
|
||||
Package: ndpi
|
||||
Architecture: @EXTN@
|
||||
Depends: libnuma1
|
||||
Depends: pfring (=@PFRING_VERS@-@PFRING_SVN_RELEASE@), libnuma
|
||||
Recommends:
|
||||
Suggests:
|
||||
Pre-Depends:
|
||||
Conflicts:
|
||||
Provides:
|
||||
Replaces:
|
||||
Description: A L7 DPI library.
|
||||
Description: A network probe.
|
||||
|
||||
Package: ndpi-dev
|
||||
Section: libdevel
|
||||
Architecture: @EXTN@
|
||||
Architecture: all
|
||||
Depends: ndpi (= ${binary:Version}), ${misc:Depends}
|
||||
Conflicts:
|
||||
Description: Development library and header files for ndpi
|
||||
Description: development library and header files for ndpi
|
||||
Headers, static libraries, and documentation for the ndpi library
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
usr/local/ndpi
|
||||
|
||||
@@ -17,7 +17,18 @@ esac
|
||||
|
||||
umask 022
|
||||
|
||||
# Update shared libs
|
||||
echo "/usr/local/lib\n" > /etc/ld.so.conf.d/nprobe.conf
|
||||
echo "Rebuilding ld cache..."
|
||||
/sbin/ldconfig
|
||||
|
||||
echo "Adding the nprobe startup script"
|
||||
update-rc.d nprobe defaults 93 >/dev/null
|
||||
|
||||
echo "Making the /etc/nprobe directory..."
|
||||
mkdir -p /etc/nprobe/
|
||||
|
||||
echo "Making the /var/log/nprobe directory..."
|
||||
mkdir -p /var/log/nprobe
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
set -e
|
||||
|
||||
#\/bin/rm /etc/ld.so.conf.d/nprobe.conf
|
||||
/sbin/ldconfig
|
||||
|
||||
# Not needed: upstart does it
|
||||
if [ "$1" = "purge" ] ; then
|
||||
update-rc.d nprobe remove >/dev/null
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# preinst script
|
||||
# preinst script for nbox
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
@@ -13,6 +13,9 @@ set -e
|
||||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
if test -f /usr/local/sbin/nprobe; then
|
||||
rm /usr/local/sbin/nprobe
|
||||
fi
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
@@ -27,4 +30,6 @@ esac
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Only shut the daemon down if we're really removing the package. If this is
|
||||
# an upgrade, we will instead do a restart in the postinst... this keeps nprobe
|
||||
# from being left shut down for a long time, which could pose problems.
|
||||
case "$1" in
|
||||
upgrade)
|
||||
;;
|
||||
*)
|
||||
/etc/init.d/nprobe stop
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
@@ -1,7 +1,16 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
# export DH_VERBOSE=1
|
||||
|
||||
#
|
||||
# debian/compat
|
||||
# We should use at least compatibility version 5
|
||||
# but this requires the whole building process
|
||||
# to be remade and this is something we leave
|
||||
# to when we will have more time
|
||||
# http://www.tin.org/bin/man.cgi?section=7&topic=debhelper
|
||||
#
|
||||
|
||||
package=ndpi
|
||||
|
||||
@@ -28,20 +37,20 @@ binary-indep: build install
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep
|
||||
#dh_clean -k
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
dh_installinit
|
||||
dh_installman
|
||||
# install the files into debian/tmp.
|
||||
cp -r ./usr/ ./debian/tmp
|
||||
cp -r ./ndpi-dev/* ./debian/ndpi-dev/
|
||||
-find ./debian/tmp -name .svn -exec /bin/rm -rf {} ';'
|
||||
-find ./debian/tmp -executable -type f |xargs strip
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_installdeb
|
||||
mkdir -p ./debian/ndpi ./debian/ndpi-dev
|
||||
cp -r ./debian/ndpi-tmp/* ./debian/ndpi/
|
||||
cp -r ./debian/ndpi-dev-tmp/* ./debian/ndpi-dev/
|
||||
-find ./debian/ndpi -executable -type f | xargs strip
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTPATH="$(cd "$(dirname "$0")"; pwd -P)"
|
||||
RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev)"
|
||||
MAJOR_RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev|cut -d. -f1)"
|
||||
REVISION="$(cd ${SCRIPTPATH}; git rev-list --all |wc -l | tr -d '[[:space:]]')"
|
||||
|
||||
get_release() {
|
||||
echo "${RELEASE}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
get_major_release() {
|
||||
echo "${MAJOR_RELEASE}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
get_revision() {
|
||||
echo "${REVISION}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
get_version() {
|
||||
echo "${RELEASE}-${REVISION}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--release)
|
||||
get_release;
|
||||
;;
|
||||
--major-release)
|
||||
get_major_release;
|
||||
;;
|
||||
--revision)
|
||||
get_revision;
|
||||
;;
|
||||
--version)
|
||||
get_version;
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ${0} {--release|--major-release|--revision|--version}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1,4 +1,4 @@
|
||||
plibrary_includedir=$(includedir)/libndpi-@VERSION@/libndpi
|
||||
library_includedir=$(includedir)/libndpi-@VERSION@/libndpi
|
||||
|
||||
library_include_HEADERS = ndpi_api.h \
|
||||
ndpi_define.h \
|
||||
|
||||
+1
-41
@@ -213,13 +213,11 @@ extern "C" {
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow given for the detection module
|
||||
* @par enable_guess = guess protocol if unknown
|
||||
* @return the detected protocol even if the flow is not completed;
|
||||
*
|
||||
*/
|
||||
ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int8_t enable_guess);
|
||||
struct ndpi_flow_struct *flow);
|
||||
|
||||
/**
|
||||
* Processes an extra packet in order to get more information for a given protocol
|
||||
@@ -328,7 +326,6 @@ extern "C" {
|
||||
* Search and return the protocol guessed that is undetected
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow we're trying to guess, NULL if not available
|
||||
* @par proto = the l4 protocol number
|
||||
* @par shost = source address in host byte order
|
||||
* @par sport = source port number
|
||||
@@ -338,7 +335,6 @@ extern "C" {
|
||||
*
|
||||
*/
|
||||
ndpi_protocol ndpi_guess_undetected_protocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int8_t proto,
|
||||
u_int32_t shost,
|
||||
u_int16_t sport,
|
||||
@@ -436,20 +432,6 @@ extern "C" {
|
||||
char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol proto, char *buf, u_int buf_len);
|
||||
|
||||
/**
|
||||
* Same as ndpi_protocol2name() with the difference that the numeric protocol
|
||||
* name is returned
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par proto = the struct ndpi_protocol contain the protocols name
|
||||
* @par buf = the buffer to write the name of the protocols
|
||||
* @par buf_len = the length of the buffer
|
||||
* @return the buffer contains the master_protocol and protocol name
|
||||
*
|
||||
*/
|
||||
char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol proto, char *buf, u_int buf_len);
|
||||
|
||||
/**
|
||||
* Find out if a given category is custom/user-defined
|
||||
*
|
||||
@@ -739,17 +721,9 @@ extern "C" {
|
||||
int ndpi_load_hostname_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *name, ndpi_protocol_category_t category);
|
||||
int ndpi_enable_loaded_categories(struct ndpi_detection_module_struct *ndpi_struct);
|
||||
int ndpi_fill_ip_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int32_t saddr,
|
||||
u_int32_t daddr,
|
||||
ndpi_protocol *ret);
|
||||
int ndpi_match_custom_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *name, unsigned long *id);
|
||||
void ndpi_fill_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
ndpi_protocol *ret);
|
||||
int ndpi_get_custom_category_match(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *name_or_ip, unsigned long *id);
|
||||
int ndpi_set_detection_preferences(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_detection_preference pref,
|
||||
int value);
|
||||
@@ -759,12 +733,6 @@ extern "C" {
|
||||
u_int ndpi_get_ndpi_num_custom_protocols(struct ndpi_detection_module_struct *ndpi_mod);
|
||||
u_int ndpi_get_ndpi_detection_module_size();
|
||||
void ndpi_set_log_level(struct ndpi_detection_module_struct *ndpi_mod, u_int l);
|
||||
|
||||
/* LRU cache */
|
||||
struct ndpi_lru_cache* ndpi_lru_cache_init(u_int32_t num_entries);
|
||||
void ndpi_lru_free_cache(struct ndpi_lru_cache *c);
|
||||
u_int8_t ndpi_lru_find_cache(struct ndpi_lru_cache *c, u_int32_t key, u_int8_t clean_key_when_found);
|
||||
void ndpi_lru_add_to_cache(struct ndpi_lru_cache *c, u_int32_t key);
|
||||
|
||||
/**
|
||||
* Add a string to match to an automata
|
||||
@@ -788,14 +756,6 @@ extern "C" {
|
||||
void * ndpi_calloc(unsigned long count, size_t size);
|
||||
void ndpi_free(void *ptr);
|
||||
u_int8_t ndpi_get_api_version();
|
||||
|
||||
/* https://github.com/corelight/community-id-spec */
|
||||
int ndpi_flowv4_flow_hash(u_int8_t l4_proto, u_int32_t src_ip, u_int32_t dst_ip, u_int16_t src_port, u_int16_t dst_port,
|
||||
u_int8_t icmp_type, u_int8_t icmp_code, u_char *hash_buf, u_int8_t hash_buf_len);
|
||||
int ndpi_flowv6_flow_hash(u_int8_t l4_proto, struct ndpi_in6_addr *src_ip, struct ndpi_in6_addr *dst_ip,
|
||||
u_int16_t src_port, u_int16_t dst_port, u_int8_t icmp_type, u_int8_t icmp_code,
|
||||
u_char *hash_buf, u_int8_t hash_buf_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -332,32 +332,9 @@
|
||||
#endif
|
||||
|
||||
#define NDPI_MAX_DNS_REQUESTS 16
|
||||
#define NDPI_MIN_NUM_STUN_DETECTION 8
|
||||
|
||||
#define NDPI_MAJOR @NDPI_MAJOR@
|
||||
#define NDPI_MINOR @NDPI_MINOR@
|
||||
#define NDPI_PATCH @NDPI_PATCH@
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
#include <libkern/OSByteOrder.h>
|
||||
|
||||
#define htobe16(x) OSSwapHostToBigInt16(x)
|
||||
#define htole16(x) OSSwapHostToLittleInt16(x)
|
||||
#define be16toh(x) OSSwapBigToHostInt16(x)
|
||||
#define le16toh(x) OSSwapLittleToHostInt16(x)
|
||||
|
||||
#define htobe32(x) OSSwapHostToBigInt32(x)
|
||||
#define htole32(x) OSSwapHostToLittleInt32(x)
|
||||
#define be32toh(x) OSSwapBigToHostInt32(x)
|
||||
#define le32toh(x) OSSwapLittleToHostInt32(x)
|
||||
|
||||
#define htobe64(x) OSSwapHostToBigInt64(x)
|
||||
#define htole64(x) OSSwapHostToLittleInt64(x)
|
||||
#define be64toh(x) OSSwapBigToHostInt64(x)
|
||||
#define le64toh(x) OSSwapLittleToHostInt64(x)
|
||||
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
#endif /* __NDPI_DEFINE_INCLUDE_FILE__ */
|
||||
|
||||
@@ -97,7 +97,6 @@ extern "C" {
|
||||
|
||||
extern void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_protocol_breed_t protoBreed, u_int16_t protoId,
|
||||
u_int8_t can_have_a_subprotocol,
|
||||
u_int16_t tcp_alias_protoId[2],
|
||||
u_int16_t udp_alias_protoId[2], char *protoName,
|
||||
ndpi_protocol_category_t protoCategory,
|
||||
@@ -120,7 +119,6 @@ extern "C" {
|
||||
u_int16_t ndpi_get_proto_by_name(struct ndpi_detection_module_struct *ndpi_mod, const char *name);
|
||||
|
||||
extern u_int16_t ndpi_guess_protocol_id(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int8_t proto, u_int16_t sport, u_int16_t dport,
|
||||
u_int8_t *user_defined_proto);
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_BGP = 13,
|
||||
NDPI_PROTOCOL_SNMP = 14,
|
||||
NDPI_PROTOCOL_XDMCP = 15,
|
||||
NDPI_PROTOCOL_SMBV1 = 16, /* SMB version 1 */
|
||||
NDPI_PROTOCOL_SMB = 16,
|
||||
NDPI_PROTOCOL_SYSLOG = 17,
|
||||
NDPI_PROTOCOL_DHCP = 18,
|
||||
NDPI_PROTOCOL_POSTGRES = 19,
|
||||
@@ -72,20 +72,20 @@ typedef enum {
|
||||
NDPI_PROTOCOL_GNUTELLA = 35,
|
||||
NDPI_PROTOCOL_EDONKEY = 36, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_BITTORRENT = 37,
|
||||
NDPI_PROTOCOL_SKYPE_CALL = 38, /* Skype call and videocalls */
|
||||
NDPI_PROTOCOL_SIGNAL = 39,
|
||||
NDPI_PROTOCOL_SKYPE_CALL_OUT = 38,
|
||||
NDPI_PROTOCOL_MUSICALLY = 39,
|
||||
NDPI_PROTOCOL_MEMCACHED = 40, /* Memcached - Darryl Sokoloski <darryl@egloo.ca> */
|
||||
NDPI_PROTOCOL_SMBV23 = 41, /* SMB version 2/3 */
|
||||
NDPI_PROTOCOL_MINING = 42, /* Bitcoin, Ethereum, ZCash, Monero */
|
||||
NDPI_PROTOCOL_NEST_LOG_SINK = 43, /* Nest Log Sink (Nest Protect) - Darryl Sokoloski <darryl@egloo.ca> */
|
||||
NDPI_PROTOCOL_MODBUS = 44, /* Modbus */
|
||||
|
||||
NDPI_PROTOCOL_FREE_41 = 41, /* Free */
|
||||
NDPI_PROTOCOL_FREE_42 = 42, /* Free */
|
||||
NDPI_PROTOCOL_FREE_43 = 43, /* Free */
|
||||
NDPI_PROTOCOL_FREE_44 = 44, /* Free */
|
||||
NDPI_PROTOCOL_FREE_45 = 45, /* Free */
|
||||
NDPI_PROTOCOL_FREE_46 = 46, /* Free */
|
||||
|
||||
NDPI_PROTOCOL_XBOX = 47,
|
||||
NDPI_PROTOCOL_QQ = 48,
|
||||
NDPI_PROTOCOL_FREE_49 = 49, /* Free */
|
||||
NDPI_PROTOCOL_SKYPE_CALL_IN = 49,
|
||||
NDPI_PROTOCOL_RTSP = 50,
|
||||
NDPI_PROTOCOL_MAIL_IMAPS = 51,
|
||||
NDPI_PROTOCOL_ICECAST = 52,
|
||||
|
||||
@@ -204,7 +204,6 @@ void ndpi_search_fix(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
void ndpi_search_csgo(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_ajp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_memcached(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
void ndpi_search_nest_log_sink(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
|
||||
/* --- INIT FUNCTIONS --- */
|
||||
void init_diameter_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_afp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -261,7 +260,6 @@ void init_maplestory_dissector(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
void init_mdns_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_megaco_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mgpc_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mining_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mms_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_msn_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mpegts_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -325,7 +323,6 @@ void init_tor_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int3
|
||||
void init_tvants_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_tvuplayer_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_usenet_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_upnp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_veohtv_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_vhua_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_viber_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -361,7 +358,4 @@ void init_whatsapp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u
|
||||
void init_ajp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_fbzero_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_memcached_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_nest_log_sink_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ookla_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_modbus_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
#endif /* __NDPI_PROTOCOLS_H__ */
|
||||
|
||||
+223
-255
@@ -25,22 +25,24 @@
|
||||
#define __NDPI_TYPEDEFS_H__
|
||||
|
||||
#include "ndpi_define.h"
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
/* Needed to have access to HAVE_* defines */
|
||||
#include "ndpi_config.h"
|
||||
|
||||
/* NDPI_LOG_LEVEL */
|
||||
typedef enum {
|
||||
NDPI_LOG_ERROR,
|
||||
NDPI_LOG_TRACE,
|
||||
NDPI_LOG_DEBUG,
|
||||
NDPI_LOG_DEBUG_EXTRA
|
||||
NDPI_LOG_ERROR,
|
||||
NDPI_LOG_TRACE,
|
||||
NDPI_LOG_DEBUG,
|
||||
NDPI_LOG_DEBUG_EXTRA
|
||||
} ndpi_log_level_t;
|
||||
|
||||
/* NDPI_VISIT */
|
||||
typedef enum {
|
||||
ndpi_preorder,
|
||||
ndpi_postorder,
|
||||
ndpi_endorder,
|
||||
ndpi_leaf
|
||||
ndpi_preorder,
|
||||
ndpi_postorder,
|
||||
ndpi_endorder,
|
||||
ndpi_leaf
|
||||
} ndpi_VISIT;
|
||||
|
||||
/* NDPI_NODE */
|
||||
@@ -302,15 +304,6 @@ struct ndpi_icmphdr {
|
||||
} un;
|
||||
} PACK_OFF;
|
||||
|
||||
/* +++++++++++++++++++++++ VXLAN header +++++++++++++++++++++++ */
|
||||
|
||||
PACK_ON
|
||||
struct ndpi_vxlanhdr {
|
||||
u_int16_t flags;
|
||||
u_int16_t groupPolicy;
|
||||
u_int32_t vni;
|
||||
} PACK_OFF;
|
||||
|
||||
/* ************************************************************ */
|
||||
/* ******************* ********************* ****************** */
|
||||
/* ************************************************************ */
|
||||
@@ -365,21 +358,17 @@ PACK_ON struct tinc_cache_entry {
|
||||
} PACK_OFF;
|
||||
|
||||
typedef enum {
|
||||
HTTP_METHOD_UNKNOWN = 0,
|
||||
HTTP_METHOD_OPTIONS,
|
||||
HTTP_METHOD_GET,
|
||||
HTTP_METHOD_HEAD,
|
||||
HTTP_METHOD_POST,
|
||||
HTTP_METHOD_PUT,
|
||||
HTTP_METHOD_DELETE,
|
||||
HTTP_METHOD_TRACE,
|
||||
HTTP_METHOD_CONNECT
|
||||
HTTP_METHOD_UNKNOWN = 0,
|
||||
HTTP_METHOD_OPTIONS,
|
||||
HTTP_METHOD_GET,
|
||||
HTTP_METHOD_HEAD,
|
||||
HTTP_METHOD_POST,
|
||||
HTTP_METHOD_PUT,
|
||||
HTTP_METHOD_DELETE,
|
||||
HTTP_METHOD_TRACE,
|
||||
HTTP_METHOD_CONNECT
|
||||
} ndpi_http_method;
|
||||
|
||||
struct ndpi_lru_cache {
|
||||
u_int32_t num_entries, *entries;
|
||||
};
|
||||
|
||||
struct ndpi_id_struct {
|
||||
/**
|
||||
detected_protocol_bitmask:
|
||||
@@ -388,230 +377,227 @@ struct ndpi_id_struct {
|
||||
to compare this, use:
|
||||
**/
|
||||
NDPI_PROTOCOL_BITMASK detected_protocol_bitmask;
|
||||
/* NDPI_PROTOCOL_RTSP */
|
||||
/* NDPI_PROTOCOL_RTSP */
|
||||
ndpi_ip_addr_t rtsp_ip_address;
|
||||
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
u_int32_t yahoo_video_lan_timer;
|
||||
|
||||
/* NDPI_PROTOCOL_IRC_MAXPORT % 2 must be 0 */
|
||||
/* NDPI_PROTOCOL_IRC */
|
||||
/* NDPI_PROTOCOL_IRC */
|
||||
#define NDPI_PROTOCOL_IRC_MAXPORT 8
|
||||
u_int16_t irc_port[NDPI_PROTOCOL_IRC_MAXPORT];
|
||||
u_int32_t last_time_port_used[NDPI_PROTOCOL_IRC_MAXPORT];
|
||||
u_int32_t irc_ts;
|
||||
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
u_int32_t gnutella_ts;
|
||||
|
||||
/* NDPI_PROTOCOL_BATTLEFIELD */
|
||||
/* NDPI_PROTOCOL_BATTLEFIELD */
|
||||
u_int32_t battlefield_ts;
|
||||
|
||||
/* NDPI_PROTOCOL_THUNDER */
|
||||
/* NDPI_PROTOCOL_THUNDER */
|
||||
u_int32_t thunder_ts;
|
||||
|
||||
/* NDPI_PROTOCOL_RTSP */
|
||||
/* NDPI_PROTOCOL_RTSP */
|
||||
u_int32_t rtsp_timer;
|
||||
|
||||
/* NDPI_PROTOCOL_OSCAR */
|
||||
/* NDPI_PROTOCOL_OSCAR */
|
||||
u_int32_t oscar_last_safe_access_time;
|
||||
|
||||
/* NDPI_PROTOCOL_ZATTOO */
|
||||
/* NDPI_PROTOCOL_ZATTOO */
|
||||
u_int32_t zattoo_ts;
|
||||
|
||||
/* NDPI_PROTOCOL_UNENCRYPTED_JABBER */
|
||||
/* NDPI_PROTOCOL_UNENCRYPTED_JABBER */
|
||||
u_int32_t jabber_stun_or_ft_ts;
|
||||
|
||||
/* NDPI_PROTOCOL_DIRECTCONNECT */
|
||||
/* NDPI_PROTOCOL_DIRECTCONNECT */
|
||||
u_int32_t directconnect_last_safe_access_time;
|
||||
|
||||
/* NDPI_PROTOCOL_SOULSEEK */
|
||||
/* NDPI_PROTOCOL_SOULSEEK */
|
||||
u_int32_t soulseek_last_safe_access_time;
|
||||
|
||||
/* NDPI_PROTOCOL_DIRECTCONNECT */
|
||||
/* NDPI_PROTOCOL_DIRECTCONNECT */
|
||||
u_int16_t detected_directconnect_port;
|
||||
u_int16_t detected_directconnect_udp_port;
|
||||
u_int16_t detected_directconnect_ssl_port;
|
||||
|
||||
/* NDPI_PROTOCOL_BITTORRENT */
|
||||
/* NDPI_PROTOCOL_BITTORRENT */
|
||||
#define NDPI_BT_PORTS 8
|
||||
u_int16_t bt_port_t[NDPI_BT_PORTS];
|
||||
u_int16_t bt_port_u[NDPI_BT_PORTS];
|
||||
|
||||
/* NDPI_PROTOCOL_UNENCRYPTED_JABBER */
|
||||
/* NDPI_PROTOCOL_UNENCRYPTED_JABBER */
|
||||
#define JABBER_MAX_STUN_PORTS 6
|
||||
u_int16_t jabber_voice_stun_port[JABBER_MAX_STUN_PORTS];
|
||||
u_int16_t jabber_file_transfer_port[2];
|
||||
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
u_int16_t detected_gnutella_port;
|
||||
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
u_int16_t detected_gnutella_udp_port1;
|
||||
u_int16_t detected_gnutella_udp_port2;
|
||||
|
||||
/* NDPI_PROTOCOL_SOULSEEK */
|
||||
/* NDPI_PROTOCOL_SOULSEEK */
|
||||
u_int16_t soulseek_listen_port;
|
||||
|
||||
/* NDPI_PROTOCOL_IRC */
|
||||
/* NDPI_PROTOCOL_IRC */
|
||||
u_int8_t irc_number_of_port;
|
||||
|
||||
/* NDPI_PROTOCOL_OSCAR */
|
||||
/* NDPI_PROTOCOL_OSCAR */
|
||||
u_int8_t oscar_ssl_session_id[33];
|
||||
|
||||
/* NDPI_PROTOCOL_UNENCRYPTED_JABBER */
|
||||
/* NDPI_PROTOCOL_UNENCRYPTED_JABBER */
|
||||
u_int8_t jabber_voice_stun_used_ports;
|
||||
|
||||
/* NDPI_PROTOCOL_SIP */
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
/* NDPI_PROTOCOL_SIP */
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
u_int32_t yahoo_video_lan_dir:1;
|
||||
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
u_int32_t yahoo_conf_logged_in:1;
|
||||
u_int32_t yahoo_voice_conf_logged_in:1;
|
||||
|
||||
/* NDPI_PROTOCOL_RTSP */
|
||||
/* NDPI_PROTOCOL_RTSP */
|
||||
u_int32_t rtsp_ts_set:1;
|
||||
};
|
||||
|
||||
/* ************************************************** */
|
||||
|
||||
struct ndpi_flow_tcp_struct {
|
||||
/* NDPI_PROTOCOL_MAIL_SMTP */
|
||||
/* NDPI_PROTOCOL_MAIL_SMTP */
|
||||
u_int16_t smtp_command_bitmask;
|
||||
|
||||
/* NDPI_PROTOCOL_MAIL_POP */
|
||||
/* NDPI_PROTOCOL_MAIL_POP */
|
||||
u_int16_t pop_command_bitmask;
|
||||
|
||||
/* NDPI_PROTOCOL_QQ */
|
||||
/* NDPI_PROTOCOL_QQ */
|
||||
u_int16_t qq_nxt_len;
|
||||
|
||||
/* NDPI_PROTOCOL_WHATSAPP */
|
||||
u_int8_t wa_matched_so_far;
|
||||
|
||||
/* NDPI_PROTOCOL_TDS */
|
||||
/* NDPI_PROTOCOL_TDS */
|
||||
u_int8_t tds_login_version;
|
||||
|
||||
/* NDPI_PROTOCOL_IRC */
|
||||
/* NDPI_PROTOCOL_IRC */
|
||||
u_int8_t irc_stage;
|
||||
u_int8_t irc_port;
|
||||
|
||||
/* NDPI_PROTOCOL_H323 */
|
||||
/* NDPI_PROTOCOL_H323 */
|
||||
u_int8_t h323_valid_packets;
|
||||
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
u_int8_t gnutella_msg_id[3];
|
||||
|
||||
/* NDPI_PROTOCOL_IRC */
|
||||
/* NDPI_PROTOCOL_IRC */
|
||||
u_int32_t irc_3a_counter:3;
|
||||
u_int32_t irc_stage2:5;
|
||||
u_int32_t irc_direction:2;
|
||||
u_int32_t irc_0x1000_full:1;
|
||||
|
||||
/* NDPI_PROTOCOL_SOULSEEK */
|
||||
/* NDPI_PROTOCOL_SOULSEEK */
|
||||
u_int32_t soulseek_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_TDS */
|
||||
/* NDPI_PROTOCOL_TDS */
|
||||
u_int32_t tds_stage:3;
|
||||
|
||||
/* NDPI_PROTOCOL_USENET */
|
||||
/* NDPI_PROTOCOL_USENET */
|
||||
u_int32_t usenet_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_IMESH */
|
||||
/* NDPI_PROTOCOL_IMESH */
|
||||
u_int32_t imesh_stage:4;
|
||||
|
||||
/* NDPI_PROTOCOL_HTTP */
|
||||
/* NDPI_PROTOCOL_HTTP */
|
||||
u_int32_t http_setup_dir:2;
|
||||
u_int32_t http_stage:2;
|
||||
u_int32_t http_empty_line_seen:1;
|
||||
u_int32_t http_wait_for_retransmission:1;
|
||||
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
/* NDPI_PROTOCOL_GNUTELLA */
|
||||
u_int32_t gnutella_stage:2; // 0 - 2
|
||||
|
||||
/* NDPI_CONTENT_MMS */
|
||||
/* NDPI_CONTENT_MMS */
|
||||
u_int32_t mms_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
u_int32_t yahoo_sip_comm:1;
|
||||
u_int32_t yahoo_http_proxy_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_MSN */
|
||||
/* NDPI_PROTOCOL_MSN */
|
||||
u_int32_t msn_stage:3;
|
||||
u_int32_t msn_ssl_ft:2;
|
||||
|
||||
/* NDPI_PROTOCOL_SSH */
|
||||
/* NDPI_PROTOCOL_SSH */
|
||||
u_int32_t ssh_stage:3;
|
||||
|
||||
/* NDPI_PROTOCOL_VNC */
|
||||
/* NDPI_PROTOCOL_VNC */
|
||||
u_int32_t vnc_stage:2; // 0 - 3
|
||||
|
||||
/* NDPI_PROTOCOL_TELNET */
|
||||
/* NDPI_PROTOCOL_TELNET */
|
||||
u_int32_t telnet_stage:2; // 0 - 2
|
||||
|
||||
/* NDPI_PROTOCOL_SSL */
|
||||
/* NDPI_PROTOCOL_SSL */
|
||||
u_int8_t ssl_seen_client_cert:1, ssl_seen_server_cert:1, ssl_stage:2; // 0 - 5
|
||||
|
||||
/* NDPI_PROTOCOL_POSTGRES */
|
||||
/* NDPI_PROTOCOL_POSTGRES */
|
||||
u_int32_t postgres_stage:3;
|
||||
|
||||
/* NDPI_PROTOCOL_DIRECT_DOWNLOAD_LINK */
|
||||
/* NDPI_PROTOCOL_DIRECT_DOWNLOAD_LINK */
|
||||
u_int32_t ddlink_server_direction:1;
|
||||
u_int32_t seen_syn:1;
|
||||
u_int32_t seen_syn_ack:1;
|
||||
u_int32_t seen_ack:1;
|
||||
|
||||
/* NDPI_PROTOCOL_ICECAST */
|
||||
/* NDPI_PROTOCOL_ICECAST */
|
||||
u_int32_t icecast_stage:1;
|
||||
|
||||
/* NDPI_PROTOCOL_DOFUS */
|
||||
/* NDPI_PROTOCOL_DOFUS */
|
||||
u_int32_t dofus_stage:1;
|
||||
|
||||
/* NDPI_PROTOCOL_FIESTA */
|
||||
/* NDPI_PROTOCOL_FIESTA */
|
||||
u_int32_t fiesta_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_WORLDOFWARCRAFT */
|
||||
/* NDPI_PROTOCOL_WORLDOFWARCRAFT */
|
||||
u_int32_t wow_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_HTTP_APPLICATION_VEOHTV */
|
||||
/* NDPI_PROTOCOL_HTTP_APPLICATION_VEOHTV */
|
||||
u_int32_t veoh_tv_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_SHOUTCAST */
|
||||
/* NDPI_PROTOCOL_SHOUTCAST */
|
||||
u_int32_t shoutcast_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_RTP */
|
||||
/* NDPI_PROTOCOL_RTP */
|
||||
u_int32_t rtp_special_packets_seen:1;
|
||||
|
||||
/* NDPI_PROTOCOL_MAIL_POP */
|
||||
/* NDPI_PROTOCOL_MAIL_POP */
|
||||
u_int32_t mail_pop_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_MAIL_IMAP */
|
||||
/* NDPI_PROTOCOL_MAIL_IMAP */
|
||||
u_int32_t mail_imap_stage:3, mail_imap_starttls:2;
|
||||
|
||||
/* NDPI_PROTOCOL_SKYPE */
|
||||
/* NDPI_PROTOCOL_SKYPE */
|
||||
u_int8_t skype_packet_id;
|
||||
|
||||
/* NDPI_PROTOCOL_CITRIX */
|
||||
/* NDPI_PROTOCOL_CITRIX */
|
||||
u_int8_t citrix_packet_id;
|
||||
|
||||
/* NDPI_PROTOCOL_LOTUS_NOTES */
|
||||
/* NDPI_PROTOCOL_LOTUS_NOTES */
|
||||
u_int8_t lotus_notes_packet_id;
|
||||
|
||||
/* NDPI_PROTOCOL_TEAMVIEWER */
|
||||
/* NDPI_PROTOCOL_TEAMVIEWER */
|
||||
u_int8_t teamviewer_stage;
|
||||
|
||||
/* NDPI_PROTOCOL_ZMQ */
|
||||
/* NDPI_PROTOCOL_ZMQ */
|
||||
u_int8_t prev_zmq_pkt_len;
|
||||
u_char prev_zmq_pkt[10];
|
||||
|
||||
/* NDPI_PROTOCOL_PPSTREAM */
|
||||
/* NDPI_PROTOCOL_PPSTREAM */
|
||||
u_int32_t ppstream_stage:3;
|
||||
|
||||
/* NDPI_PROTOCOL_MEMCACHED */
|
||||
/* NDPI_PROTOCOL_MEMCACHED */
|
||||
u_int8_t memcached_matches;
|
||||
|
||||
/* NDPI_PROTOCOL_NEST_LOG_SINK */
|
||||
u_int8_t nest_log_sink_matches;
|
||||
}
|
||||
#ifndef WIN32
|
||||
__attribute__ ((__packed__))
|
||||
@@ -621,51 +607,51 @@ struct ndpi_flow_tcp_struct {
|
||||
/* ************************************************** */
|
||||
|
||||
struct ndpi_flow_udp_struct {
|
||||
/* NDPI_PROTOCOL_BATTLEFIELD */
|
||||
/* NDPI_PROTOCOL_BATTLEFIELD */
|
||||
u_int32_t battlefield_msg_id;
|
||||
|
||||
/* NDPI_PROTOCOL_SNMP */
|
||||
/* NDPI_PROTOCOL_SNMP */
|
||||
u_int32_t snmp_msg_id;
|
||||
|
||||
/* NDPI_PROTOCOL_BATTLEFIELD */
|
||||
/* NDPI_PROTOCOL_BATTLEFIELD */
|
||||
u_int32_t battlefield_stage:3;
|
||||
|
||||
/* NDPI_PROTOCOL_SNMP */
|
||||
/* NDPI_PROTOCOL_SNMP */
|
||||
u_int32_t snmp_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_PPSTREAM */
|
||||
/* NDPI_PROTOCOL_PPSTREAM */
|
||||
u_int32_t ppstream_stage:3; // 0 - 7
|
||||
|
||||
/* NDPI_PROTOCOL_HALFLIFE2 */
|
||||
/* NDPI_PROTOCOL_HALFLIFE2 */
|
||||
u_int32_t halflife2_stage:2; // 0 - 2
|
||||
|
||||
/* NDPI_PROTOCOL_TFTP */
|
||||
/* NDPI_PROTOCOL_TFTP */
|
||||
u_int32_t tftp_stage:1;
|
||||
|
||||
/* NDPI_PROTOCOL_AIMINI */
|
||||
/* NDPI_PROTOCOL_AIMINI */
|
||||
u_int32_t aimini_stage:5;
|
||||
|
||||
/* NDPI_PROTOCOL_XBOX */
|
||||
/* NDPI_PROTOCOL_XBOX */
|
||||
u_int32_t xbox_stage:1;
|
||||
|
||||
/* NDPI_PROTOCOL_WINDOWS_UPDATE */
|
||||
/* NDPI_PROTOCOL_WINDOWS_UPDATE */
|
||||
u_int32_t wsus_stage:1;
|
||||
|
||||
/* NDPI_PROTOCOL_SKYPE */
|
||||
/* NDPI_PROTOCOL_SKYPE */
|
||||
u_int8_t skype_packet_id;
|
||||
|
||||
/* NDPI_PROTOCOL_TEAMVIEWER */
|
||||
/* NDPI_PROTOCOL_TEAMVIEWER */
|
||||
u_int8_t teamviewer_stage;
|
||||
|
||||
/* NDPI_PROTOCOL_EAQ */
|
||||
/* NDPI_PROTOCOL_EAQ */
|
||||
u_int8_t eaq_pkt_id;
|
||||
u_int32_t eaq_sequence;
|
||||
|
||||
/* NDPI_PROTOCOL_RX */
|
||||
/* NDPI_PROTOCOL_RX */
|
||||
u_int32_t rx_conn_epoch;
|
||||
u_int32_t rx_conn_id;
|
||||
|
||||
/* NDPI_PROTOCOL_MEMCACHED */
|
||||
/* NDPI_PROTOCOL_MEMCACHED */
|
||||
u_int8_t memcached_matches;
|
||||
}
|
||||
#ifndef WIN32
|
||||
@@ -759,94 +745,83 @@ typedef struct {
|
||||
} ndpi_port_range;
|
||||
|
||||
typedef enum {
|
||||
NDPI_PROTOCOL_SAFE = 0, /* Surely doesn't provide risks for the network. (e.g., a news site) */
|
||||
NDPI_PROTOCOL_ACCEPTABLE, /* Probably doesn't provide risks, but could be malicious (e.g., Dropbox) */
|
||||
NDPI_PROTOCOL_FUN, /* Pure fun protocol, which may be prohibited by the user policy (e.g., Netflix) */
|
||||
NDPI_PROTOCOL_UNSAFE, /* Probably provides risks, but could be a normal traffic. Unencrypted protocols with clear pass should be here (e.g., telnet) */
|
||||
NDPI_PROTOCOL_POTENTIALLY_DANGEROUS, /* Surely is dangerous (ex. Tor). Be prepared to troubles */
|
||||
NDPI_PROTOCOL_TRACKER_ADS, /* Trackers, Advertisements... */
|
||||
NDPI_PROTOCOL_UNRATED /* No idea, not implemented or impossible to classify */
|
||||
NDPI_PROTOCOL_SAFE = 0, /* Surely doesn't provide risks for the network. (e.g., a news site) */
|
||||
NDPI_PROTOCOL_ACCEPTABLE, /* Probably doesn't provide risks, but could be malicious (e.g., Dropbox) */
|
||||
NDPI_PROTOCOL_FUN, /* Pure fun protocol, which may be prohibited by the user policy (e.g., Netflix) */
|
||||
NDPI_PROTOCOL_UNSAFE, /* Probably provides risks, but could be a normal traffic. Unencrypted protocols with clear pass should be here (e.g., telnet) */
|
||||
NDPI_PROTOCOL_POTENTIALLY_DANGEROUS, /* Surely is dangerous (ex. Tor). Be prepared to troubles */
|
||||
NDPI_PROTOCOL_TRACKER_ADS, /* Trackers, Advertisements... */
|
||||
NDPI_PROTOCOL_UNRATED /* No idea, not implemented or impossible to classify */
|
||||
} ndpi_protocol_breed_t;
|
||||
|
||||
#define NUM_BREEDS (NDPI_PROTOCOL_UNRATED+1)
|
||||
|
||||
/* Abstract categories to group the protocols. */
|
||||
typedef enum {
|
||||
NDPI_PROTOCOL_CATEGORY_UNSPECIFIED = 0, /* For general services and unknown protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_MEDIA, /* Multimedia and streaming */
|
||||
NDPI_PROTOCOL_CATEGORY_VPN, /* Virtual Private Networks */
|
||||
NDPI_PROTOCOL_CATEGORY_MAIL, /* Protocols to send/receive/sync emails */
|
||||
NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, /* AFS/NFS and similar protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_WEB, /* Web/mobile protocols and services */
|
||||
NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, /* Social networks */
|
||||
NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, /* Download, FTP, file transfer/sharing */
|
||||
NDPI_PROTOCOL_CATEGORY_GAME, /* Online games */
|
||||
NDPI_PROTOCOL_CATEGORY_CHAT, /* Instant messaging */
|
||||
NDPI_PROTOCOL_CATEGORY_VOIP, /* Real-time communications and conferencing */
|
||||
NDPI_PROTOCOL_CATEGORY_DATABASE, /* Protocols for database communication */
|
||||
NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, /* Remote access and control */
|
||||
NDPI_PROTOCOL_CATEGORY_CLOUD, /* Online cloud services */
|
||||
NDPI_PROTOCOL_CATEGORY_NETWORK, /* Network infrastructure protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, /* Software for collaborative development, including Webmail */
|
||||
NDPI_PROTOCOL_CATEGORY_RPC, /* High level network communication protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_STREAMING, /* Streaming protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, /* System/Operating System level applications */
|
||||
NDPI_PROTOCOL_CATEGORY_SW_UPDATE, /* Software update */
|
||||
NDPI_PROTOCOL_CATEGORY_UNSPECIFIED = 0, /* For general services and unknown protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_MEDIA, /* Multimedia and streaming */
|
||||
NDPI_PROTOCOL_CATEGORY_VPN, /* Virtual Private Networks */
|
||||
NDPI_PROTOCOL_CATEGORY_MAIL, /* Protocols to send/receive/sync emails */
|
||||
NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, /* AFS/NFS and similar protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_WEB, /* Web/mobile protocols and services */
|
||||
NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, /* Social networks */
|
||||
NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT, /* Download, FTP, file transfer/sharing */
|
||||
NDPI_PROTOCOL_CATEGORY_GAME, /* Online games */
|
||||
NDPI_PROTOCOL_CATEGORY_CHAT, /* Instant messaging */
|
||||
NDPI_PROTOCOL_CATEGORY_VOIP, /* Real-time communications and conferencing */
|
||||
NDPI_PROTOCOL_CATEGORY_DATABASE, /* Protocols for database communication */
|
||||
NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS, /* Remote access and control */
|
||||
NDPI_PROTOCOL_CATEGORY_CLOUD, /* Online cloud services */
|
||||
NDPI_PROTOCOL_CATEGORY_NETWORK, /* Network infrastructure protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, /* Software for collaborative development, including Webmail */
|
||||
NDPI_PROTOCOL_CATEGORY_RPC, /* High level network communication protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_STREAMING, /* Streaming protocols */
|
||||
NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, /* System/Operating System level applications */
|
||||
NDPI_PROTOCOL_CATEGORY_SW_UPDATE, /* Software update */
|
||||
|
||||
/* See #define NUM_CUSTOM_CATEGORIES */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_1, /* User custom category 1 */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_2, /* User custom category 2 */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_3, /* User custom category 3 */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_4, /* User custom category 4 */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_5, /* User custom category 5 */
|
||||
/* See #define NUM_CUSTOM_CATEGORIES */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_1, /* User custom category 1 */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_2, /* User custom category 2 */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_3, /* User custom category 3 */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_4, /* User custom category 4 */
|
||||
NDPI_PROTOCOL_CATEGORY_CUSTOM_5, /* User custom category 5 */
|
||||
|
||||
/* Payload Content */
|
||||
NDPI_CONTENT_CATEGORY_AVI,
|
||||
NDPI_CONTENT_CATEGORY_FLASH,
|
||||
NDPI_CONTENT_CATEGORY_OGG,
|
||||
NDPI_CONTENT_CATEGORY_MPEG,
|
||||
NDPI_CONTENT_CATEGORY_QUICKTIME,
|
||||
NDPI_CONTENT_CATEGORY_REALMEDIA,
|
||||
NDPI_CONTENT_CATEGORY_WINDOWSMEDIA,
|
||||
NDPI_CONTENT_CATEGORY_WEBM,
|
||||
/* Payload Content */
|
||||
NDPI_CONTENT_CATEGORY_AVI,
|
||||
NDPI_CONTENT_CATEGORY_FLASH,
|
||||
NDPI_CONTENT_CATEGORY_OGG,
|
||||
NDPI_CONTENT_CATEGORY_MPEG,
|
||||
NDPI_CONTENT_CATEGORY_QUICKTIME,
|
||||
NDPI_CONTENT_CATEGORY_REALMEDIA,
|
||||
NDPI_CONTENT_CATEGORY_WINDOWSMEDIA,
|
||||
NDPI_CONTENT_CATEGORY_WEBM,
|
||||
|
||||
/* Some custom categories */
|
||||
CUSTOM_CATEGORY_MINING = 99,
|
||||
CUSTOM_CATEGORY_MALWARE = 100,
|
||||
CUSTOM_CATEGORY_ADVERTISEMENT = 101,
|
||||
CUSTOM_CATEGORY_BANNED_SITE = 102,
|
||||
CUSTOM_CATEGORY_SITE_UNAVAILABLE = 103,
|
||||
|
||||
/*
|
||||
IMPORTANT
|
||||
|
||||
Please keep in sync with
|
||||
|
||||
static const char* categories[] = { ..}
|
||||
|
||||
in ndpi_main.c
|
||||
*/
|
||||
|
||||
NDPI_PROTOCOL_NUM_CATEGORIES /*
|
||||
NOTE: Keep this as last member
|
||||
Unused as value but useful to getting the number of elements
|
||||
in this datastructure
|
||||
*/
|
||||
/* Some custom categories */
|
||||
CUSTOM_CATEGORY_MINING = 99,
|
||||
CUSTOM_CATEGORY_MALWARE = 100,
|
||||
CUSTOM_CATEGORY_ADVERTISEMENT = 101,
|
||||
CUSTOM_CATEGORY_BANNED_SITE = 102,
|
||||
CUSTOM_CATEGORY_SITE_UNAVAILABLE = 103,
|
||||
|
||||
NDPI_PROTOCOL_NUM_CATEGORIES /*
|
||||
NOTE: Keep this as last member
|
||||
Unused as value but useful to getting the number of elements
|
||||
in this datastructure
|
||||
*/
|
||||
} ndpi_protocol_category_t;
|
||||
|
||||
typedef enum {
|
||||
ndpi_pref_http_dont_dissect_response = 0,
|
||||
ndpi_pref_dns_dont_dissect_response,
|
||||
ndpi_pref_direction_detect_disable,
|
||||
ndpi_pref_disable_metadata_export,
|
||||
ndpi_pref_enable_category_substring_match
|
||||
ndpi_pref_http_dont_dissect_response = 0,
|
||||
ndpi_pref_dns_dissect_response,
|
||||
ndpi_pref_direction_detect_disable,
|
||||
ndpi_pref_disable_metadata_export,
|
||||
ndpi_pref_enable_category_substring_match,
|
||||
} ndpi_detection_preference;
|
||||
|
||||
/* ntop extensions */
|
||||
typedef struct ndpi_proto_defaults {
|
||||
char *protoName;
|
||||
ndpi_protocol_category_t protoCategory;
|
||||
u_int8_t can_have_a_subprotocol;
|
||||
u_int16_t protoId, protoIdx;
|
||||
u_int16_t master_tcp_protoId[2], master_udp_protoId[2]; /* The main protocols on which this sub-protocol sits on */
|
||||
ndpi_protocol_breed_t protoBreed;
|
||||
@@ -879,26 +854,16 @@ typedef struct ndpi_proto {
|
||||
#define NUM_CUSTOM_CATEGORIES 5
|
||||
#define CUSTOM_CATEGORY_LABEL_LEN 32
|
||||
|
||||
#ifdef NDPI_LIB_COMPILATION
|
||||
|
||||
/* Needed to have access to HAVE_* defines */
|
||||
#include "ndpi_config.h"
|
||||
|
||||
#ifdef HAVE_HYPERSCAN
|
||||
#include <hs/hs.h>
|
||||
|
||||
struct hs_list {
|
||||
char *expression;
|
||||
unsigned int id;
|
||||
struct hs_list *next;
|
||||
};
|
||||
|
||||
struct hs {
|
||||
hs_database_t *database;
|
||||
hs_scratch_t *scratch;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef NDPI_LIB_COMPILATION
|
||||
|
||||
struct ndpi_detection_module_struct {
|
||||
NDPI_PROTOCOL_BITMASK detection_bitmask;
|
||||
NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
|
||||
@@ -999,25 +964,22 @@ struct ndpi_detection_module_struct {
|
||||
char ip_string[NDPI_IP_STRING_SIZE];
|
||||
#endif
|
||||
u_int8_t ip_version_limit;
|
||||
/* NDPI_PROTOCOL_BITTORRENT */
|
||||
/* NDPI_PROTOCOL_BITTORRENT */
|
||||
struct hash_ip4p_table *bt_ht;
|
||||
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
struct hash_ip4p_table *bt6_ht;
|
||||
#endif
|
||||
|
||||
/* BT_ANNOUNCE */
|
||||
/* BT_ANNOUNCE */
|
||||
struct bt_announce *bt_ann;
|
||||
int bt_ann_len;
|
||||
|
||||
/* NDPI_PROTOCOL_OOKLA */
|
||||
struct ndpi_lru_cache *ookla_cache;
|
||||
|
||||
/* NDPI_PROTOCOL_TINC */
|
||||
/* NDPI_PROTOCOL_TINC */
|
||||
struct cache *tinc_cache;
|
||||
|
||||
ndpi_proto_defaults_t proto_defaults[NDPI_MAX_SUPPORTED_PROTOCOLS+NDPI_MAX_NUM_CUSTOM_PROTOCOLS];
|
||||
|
||||
u_int8_t http_dont_dissect_response:1, dns_dont_dissect_response:1,
|
||||
u_int8_t http_dont_dissect_response:1, dns_dissect_response:1,
|
||||
direction_detect_disable:1, /* disable internal detection of packet direction */
|
||||
disable_metadata_export:1, /* No metadata is exported */
|
||||
enable_category_substring_match:1 /* Default is perfect match */
|
||||
@@ -1037,6 +999,7 @@ struct ndpi_flow_struct {
|
||||
|
||||
/* init parameter, internal used to set up timestamp,... */
|
||||
u_int16_t guessed_protocol_id, guessed_host_protocol_id, guessed_category;
|
||||
|
||||
u_int8_t protocol_id_already_guessed:1, host_already_guessed:1, init_finished:1, setup_packet_direction:1, packet_direction:1, check_extra_packets:1;
|
||||
|
||||
/*
|
||||
@@ -1047,8 +1010,6 @@ struct ndpi_flow_struct {
|
||||
|
||||
u_int8_t max_extra_packets_to_check;
|
||||
u_int8_t num_extra_packets_checked;
|
||||
u_int8_t num_processed_pkts; /* <= WARNING it can wrap but we do expect people to giveup earlier */
|
||||
|
||||
int (*extra_packets_func) (struct ndpi_detection_module_struct *, struct ndpi_flow_struct *flow);
|
||||
|
||||
/*
|
||||
@@ -1080,7 +1041,7 @@ struct ndpi_flow_struct {
|
||||
char *url, *content_type;
|
||||
u_int8_t num_request_headers, num_response_headers;
|
||||
u_int8_t request_version; /* 0=1.0 and 1=1.1. Create an enum for this? */
|
||||
u_int16_t response_status_code; /* 200, 404, etc. */
|
||||
u_char response_status_code[5]; /* 200, 404, etc. */
|
||||
} http;
|
||||
|
||||
union {
|
||||
@@ -1097,7 +1058,7 @@ struct ndpi_flow_struct {
|
||||
|
||||
struct {
|
||||
struct {
|
||||
char client_certificate[64], server_certificate[64];
|
||||
char client_certificate[48], server_certificate[48];
|
||||
} ssl;
|
||||
|
||||
struct {
|
||||
@@ -1135,7 +1096,7 @@ struct ndpi_flow_struct {
|
||||
char fingerprint[48];
|
||||
char class_ident[48];
|
||||
} dhcp;
|
||||
} protos;
|
||||
} protos;
|
||||
|
||||
/*** ALL protocol specific 64 bit variables here ***/
|
||||
|
||||
@@ -1144,83 +1105,90 @@ struct ndpi_flow_struct {
|
||||
|
||||
ndpi_protocol_category_t category;
|
||||
|
||||
/* NDPI_PROTOCOL_REDIS */
|
||||
/* NDPI_PROTOCOL_REDIS */
|
||||
u_int8_t redis_s2d_first_char, redis_d2s_first_char;
|
||||
|
||||
u_int16_t packet_counter; // can be 0 - 65000
|
||||
u_int16_t packet_direction_counter[2];
|
||||
u_int16_t byte_counter[2];
|
||||
/* NDPI_PROTOCOL_BITTORRENT */
|
||||
/* NDPI_PROTOCOL_BITTORRENT */
|
||||
u_int8_t bittorrent_stage; // can be 0 - 255
|
||||
|
||||
/* NDPI_PROTOCOL_DIRECTCONNECT */
|
||||
u_int8_t directconnect_stage:2; // 0 - 1
|
||||
/* NDPI_PROTOCOL_DIRECTCONNECT */
|
||||
u_int32_t directconnect_stage:2; // 0 - 1
|
||||
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
u_int8_t sip_yahoo_voice:1;
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
u_int32_t sip_yahoo_voice:1;
|
||||
|
||||
/* NDPI_PROTOCOL_HTTP */
|
||||
u_int8_t http_detected:1;
|
||||
u_int16_t http_upper_protocol, http_lower_protocol;
|
||||
/* NDPI_PROTOCOL_HTTP */
|
||||
u_int32_t http_detected:1;
|
||||
|
||||
/* NDPI_PROTOCOL_RTSP */
|
||||
u_int32_t rtsprdt_stage:2;
|
||||
u_int32_t rtsp_control_flow:1;
|
||||
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
u_int32_t yahoo_detection_finished:2;
|
||||
|
||||
/* NDPI_PROTOCOL_ZATTOO */
|
||||
u_int32_t zattoo_stage:3;
|
||||
|
||||
/* NDPI_PROTOCOL_QQ */
|
||||
u_int32_t qq_stage:3;
|
||||
|
||||
/* NDPI_PROTOCOL_THUNDER */
|
||||
u_int32_t thunder_stage:2; // 0 - 3
|
||||
|
||||
/* NDPI_PROTOCOL_RTSP */
|
||||
u_int8_t rtsprdt_stage:2, rtsp_control_flow:1;
|
||||
/* NDPI_PROTOCOL_OSCAR */
|
||||
u_int32_t oscar_ssl_voice_stage:3;
|
||||
u_int32_t oscar_video_voice:1;
|
||||
|
||||
/* NDPI_PROTOCOL_YAHOO */
|
||||
u_int8_t yahoo_detection_finished:2;
|
||||
/* NDPI_PROTOCOL_FLORENSIA */
|
||||
u_int32_t florensia_stage:1;
|
||||
|
||||
/* NDPI_PROTOCOL_ZATTOO */
|
||||
u_int8_t zattoo_stage:3;
|
||||
/* NDPI_PROTOCOL_SOCKS */
|
||||
u_int32_t socks5_stage:2; // 0 - 3
|
||||
u_int32_t socks4_stage:2; // 0 - 3
|
||||
|
||||
/* NDPI_PROTOCOL_QQ */
|
||||
u_int8_t qq_stage:3;
|
||||
/* NDPI_PROTOCOL_EDONKEY */
|
||||
u_int32_t edonkey_stage:2; // 0 - 3
|
||||
|
||||
/* NDPI_PROTOCOL_THUNDER */
|
||||
u_int8_t thunder_stage:2; // 0 - 3
|
||||
|
||||
/* NDPI_PROTOCOL_OSCAR */
|
||||
u_int8_t oscar_ssl_voice_stage:3, oscar_video_voice:1;
|
||||
/* NDPI_PROTOCOL_FTP_CONTROL */
|
||||
u_int32_t ftp_control_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_FLORENSIA */
|
||||
u_int8_t florensia_stage:1;
|
||||
/* NDPI_PROTOCOL_RTMP */
|
||||
u_int32_t rtmp_stage:2;
|
||||
|
||||
/* NDPI_PROTOCOL_SOCKS */
|
||||
u_int8_t socks5_stage:2, socks4_stage:2; // 0 - 3
|
||||
/* NDPI_PROTOCOL_PANDO */
|
||||
u_int32_t pando_stage:3;
|
||||
|
||||
/* NDPI_PROTOCOL_EDONKEY */
|
||||
u_int8_t edonkey_stage:2; // 0 - 3
|
||||
/* NDPI_PROTOCOL_STEAM */
|
||||
u_int32_t steam_stage:3;
|
||||
u_int32_t steam_stage1:3; // 0 - 4
|
||||
u_int32_t steam_stage2:2; // 0 - 2
|
||||
u_int32_t steam_stage3:2; // 0 - 2
|
||||
|
||||
/* NDPI_PROTOCOL_FTP_CONTROL */
|
||||
u_int8_t ftp_control_stage:2;
|
||||
/* NDPI_PROTOCOL_PPLIVE */
|
||||
u_int32_t pplive_stage1:3; // 0 - 6
|
||||
u_int32_t pplive_stage2:2; // 0 - 2
|
||||
u_int32_t pplive_stage3:2; // 0 - 2
|
||||
|
||||
/* NDPI_PROTOCOL_RTMP */
|
||||
u_int8_t rtmp_stage:2;
|
||||
/* NDPI_PROTOCOL_STARCRAFT */
|
||||
u_int32_t starcraft_udp_stage : 3; // 0-7
|
||||
|
||||
/* NDPI_PROTOCOL_PANDO */
|
||||
u_int8_t pando_stage:3;
|
||||
|
||||
/* NDPI_PROTOCOL_STEAM */
|
||||
u_int16_t steam_stage:3, steam_stage1:3, steam_stage2:2, steam_stage3:2;
|
||||
|
||||
/* NDPI_PROTOCOL_PPLIVE */
|
||||
u_int8_t pplive_stage1:3, pplive_stage2:2, pplive_stage3:2;
|
||||
|
||||
/* NDPI_PROTOCOL_STARCRAFT */
|
||||
u_int8_t starcraft_udp_stage : 3; // 0-7
|
||||
|
||||
/* NDPI_PROTOCOL_OPENVPN */
|
||||
/* NDPI_PROTOCOL_OPENVPN */
|
||||
u_int8_t ovpn_session_id[8];
|
||||
u_int8_t ovpn_counter;
|
||||
|
||||
/* NDPI_PROTOCOL_TINC */
|
||||
/* NDPI_PROTOCOL_TINC */
|
||||
u_int8_t tinc_state;
|
||||
struct tinc_cache_entry tinc_cache_entry;
|
||||
|
||||
/* NDPI_PROTOCOL_CSGO */
|
||||
/* NDPI_PROTOCOL_CSGO */
|
||||
u_int8_t csgo_strid[18],csgo_state,csgo_s2;
|
||||
u_int32_t csgo_id2;
|
||||
|
||||
/* NDPI_PROTOCOL_1KXUN || NDPI_PROTOCOL_IQIYI */
|
||||
/* NDPI_PROTOCOL_1KXUN || NDPI_PROTOCOL_IQIYI */
|
||||
u_int16_t kxun_counter, iqiyi_counter;
|
||||
|
||||
/* internal structures to save functions calls */
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Simple non-autotools dependent makefile
|
||||
#
|
||||
# ./autogen.sh
|
||||
# cd src/lib
|
||||
# make -f Makefile.simple
|
||||
#
|
||||
CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -g
|
||||
RANLIB = ranlib
|
||||
|
||||
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o
|
||||
HEADERS = $(wildcard ../include/*.h)
|
||||
|
||||
all: libndpi.a
|
||||
|
||||
ndpi_main.c: ndpi_content_match.c.inc
|
||||
|
||||
libndpi.a: $(OBJECTS)
|
||||
ar rc $@ $(OBJECTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
%.o: %.c $(HEADERS) Makefile
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
/bin/rm -f libndpi.a $(OBJECTS)
|
||||
@@ -1,67 +0,0 @@
|
||||
#
|
||||
# Simple non-autotools dependent makefile
|
||||
#
|
||||
# ./autogen.sh
|
||||
# cd src/lib
|
||||
# make Makefile
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Installation directories
|
||||
#
|
||||
prefix = @prefix@
|
||||
libdir = ${prefix}/lib
|
||||
includedir = ${prefix}/include/ndpi
|
||||
CC = @CC@
|
||||
CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -O2 -g
|
||||
RANLIB = ranlib
|
||||
|
||||
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o
|
||||
HEADERS = $(wildcard ../include/*.h)
|
||||
NDPI_VERSION_MAJOR = @NDPI_MAJOR@
|
||||
NDPI_LIB_STATIC = libndpi.a
|
||||
NDPI_LIB_SHARED_BASE = libndpi.so
|
||||
NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@
|
||||
NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED)
|
||||
|
||||
ifneq ($(OS),Windows_NT)
|
||||
OS := $(shell uname)
|
||||
endif
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
CC=clang
|
||||
SONAME_FLAG=
|
||||
else
|
||||
SONAME_FLAG=-Wl,-soname,$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
|
||||
endif
|
||||
|
||||
all: $(NDPI_LIBS)
|
||||
|
||||
ndpi_main.c: ndpi_content_match.c.inc
|
||||
|
||||
$(NDPI_LIB_STATIC): $(OBJECTS)
|
||||
ar rc $@ $(OBJECTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(NDPI_LIB_SHARED): $(OBJECTS)
|
||||
$(CC) -shared -fPIC $(SONAME_FLAG) -o $@ $(OBJECTS)
|
||||
ln -Ffs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
|
||||
ln -Ffs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
|
||||
|
||||
%.o: %.c $(HEADERS) Makefile
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
/bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo $(NDPI_LIB_SHARED)
|
||||
|
||||
distclean: clean
|
||||
/bin/rm -f Makefile
|
||||
|
||||
install: $(NDPI_LIBS)
|
||||
mkdir -p $(DESTDIR)$(libdir)
|
||||
cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/
|
||||
ln -Ffs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
|
||||
ln -Ffs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
|
||||
mkdir -p $(DESTDIR)$(includedir)
|
||||
cp ../include/*.h $(DESTDIR)$(includedir)
|
||||
@@ -21,6 +21,7 @@
|
||||
/* ****************************************************** */
|
||||
|
||||
static ndpi_network host_protocol_list[] = {
|
||||
|
||||
/*
|
||||
SoundCloud
|
||||
*/
|
||||
@@ -80,8 +81,6 @@ static ndpi_network host_protocol_list[] = {
|
||||
/*
|
||||
WhatsApp Inc.
|
||||
*/
|
||||
{ 0x1F0D4B00 /* 31.13.75.0/24 */, 24, NDPI_PROTOCOL_WHATSAPP },
|
||||
{ 0x1F0D5600 /* 31.13.86.0/24 */, 24, NDPI_PROTOCOL_WHATSAPP },
|
||||
{ 0x3216C6CC /* 50.22.198.204/30 */, 30, NDPI_PROTOCOL_WHATSAPP },
|
||||
{ 0x4B7E2720 /* 75.126.39.32/27 */, 27, NDPI_PROTOCOL_WHATSAPP },
|
||||
{ 0x6CA8B460 /* 108.168.180.96/27 */, 27, NDPI_PROTOCOL_WHATSAPP },
|
||||
@@ -112,12 +111,11 @@ static ndpi_network host_protocol_list[] = {
|
||||
WeChat
|
||||
origin AS132203, AS132591, AS45090
|
||||
*/
|
||||
|
||||
{ 0xCBCD93AB /* 203.205.147.171/32 */, 32, NDPI_PROTOCOL_WECHAT },
|
||||
{ 0xCBCD93AD /* 203.205.147.173/32 */, 32, NDPI_PROTOCOL_WECHAT },
|
||||
{ 0xCBCD97A2 /* 203.205.151.162/32 */, 32, NDPI_PROTOCOL_WECHAT },
|
||||
{ 0x67071E25 /* 103.7.30.37/32 */, 32, NDPI_PROTOCOL_WECHAT },
|
||||
{ 0XCBCDB000 /* 203.205.176.0/20 */, 20, NDPI_PROTOCOL_WECHAT },
|
||||
{ 0XCBCDC000 /* 203.205.192.0/18 */, 18, NDPI_PROTOCOL_WECHAT },
|
||||
{ 0x67071E25 /* 103.7.30.37/32 */, 32, NDPI_PROTOCOL_WECHAT },
|
||||
|
||||
/*
|
||||
OpenDNS, LLC
|
||||
@@ -543,7 +541,7 @@ static ndpi_network host_protocol_list[] = {
|
||||
{ 0xC0AD4000 /* 192.173.64.0/18 */, 18, NDPI_PROTOCOL_NETFLIX },
|
||||
{ 0xC6266000 /* 198.38.96.0/19 */, 19, NDPI_PROTOCOL_NETFLIX },
|
||||
{ 0xC62D3000 /* 198.45.48.0/20 */, 20, NDPI_PROTOCOL_NETFLIX },
|
||||
{ 0xD194D687 /* 209.148.214.135/21 */, 21, NDPI_PROTOCOL_NETFLIX },
|
||||
{ 0xD194D687 /* 209.148.214.135/21 */, 21, NDPI_PROTOCOL_NETFLIX },
|
||||
|
||||
/*
|
||||
Cloudflare, Inc.
|
||||
@@ -708,7 +706,6 @@ static ndpi_network host_protocol_list[] = {
|
||||
{ 0x287F816D /* 40.126.129.109 */, 32, NDPI_PROTOCOL_SKYPE },
|
||||
{ 0x4237DF00 /* 65.55.223.0 */, 26, NDPI_PROTOCOL_SKYPE },
|
||||
{ 0x17600000 /* 23.96.0.0 */, 13, NDPI_PROTOCOL_SKYPE },
|
||||
{ 0x34724A05 /* 52.114.74.5 */, 32, NDPI_PROTOCOL_SKYPE },
|
||||
|
||||
/*
|
||||
Blizzard Entertainment, Inc
|
||||
@@ -812,11 +809,11 @@ static ndpi_network host_protocol_list[] = {
|
||||
|
||||
/*
|
||||
Canonical Ltd (Ubuntu)
|
||||
origin AS41231z
|
||||
origin AS41231
|
||||
*/
|
||||
|
||||
{ 0x5BBD5800 /* 91.189.88.0/21 */, 21, NDPI_PROTOCOL_UBUNTUONE },
|
||||
{ 0xA2D52000 /* 162.213.32.0/22 */, 22, NDPI_PROTOCOL_UBUNTUONE },
|
||||
{ 0x5BBD5800 /* 91.189.88.0/21 */, 21, NDPI_PROTOCOL_UBUNTUONE },
|
||||
{ 0xA2D52000 /* 162.213.32.0/22 */, 22, NDPI_PROTOCOL_UBUNTUONE },
|
||||
{ 0xB97DBC00 /* 185.125.188.0/22 */, 22, NDPI_PROTOCOL_UBUNTUONE },
|
||||
|
||||
/*
|
||||
@@ -7928,7 +7925,7 @@ static ndpi_network host_protocol_list[] = {
|
||||
Valve Corporation (Steam)
|
||||
origin AS32590
|
||||
*/
|
||||
|
||||
|
||||
{ 0x2D79B800 /* 45.121.184.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x670A7C00 /* 103.10.124.0/23 */, 23, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x671C3600 /* 103.28.54.0/23 */, 23, NDPI_PROTOCOL_STEAM },
|
||||
@@ -7946,14 +7943,14 @@ static ndpi_network host_protocol_list[] = {
|
||||
{ 0xD040C800 /* 208.64.200.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xD040C900 /* 208.64.201.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xD04EA400 /* 208.78.164.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
|
||||
|
||||
/*
|
||||
VidTO
|
||||
*/
|
||||
*/
|
||||
{ 0x51111030 /* 81.17.16.48/32 */, 32, NDPI_PROTOCOL_VIDTO },
|
||||
{ 0x5fb7329d /* 95.183.50.157/32 */, 32, NDPI_PROTOCOL_VIDTO },
|
||||
{ 0x577824f2 /* 87.120.36.242/32 */, 32, NDPI_PROTOCOL_VIDTO },
|
||||
|
||||
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
|
||||
@@ -8012,7 +8009,7 @@ static ndpi_network host_protocol_list[] = {
|
||||
|
||||
/* ****************************************************** */
|
||||
|
||||
/*
|
||||
/*
|
||||
|
||||
Each part of a domain name can be no longer than 63 characters. There are no single-digit top-level domains and none contain digits. It doesn't look like ICANN will approve such domains either.
|
||||
|
||||
@@ -8094,11 +8091,11 @@ ndpi_protocol_match host_match[] = {
|
||||
{ ".facebook.net", NULL, "\\.facebook" TLD, "Facebook", NDPI_PROTOCOL_FACEBOOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN },
|
||||
{ ".fbsbx.com", NULL, "\\.fbsbx" TLD, "Facebook", NDPI_PROTOCOL_FACEBOOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN },
|
||||
|
||||
{ "speedtest.", NULL, "speedtest\\." TLD, "Ookla", NDPI_PROTOCOL_OOKLA, NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_SAFE },
|
||||
{ ".ooklaserver.net", NULL, "\\.ooklaserver\\.net" TLD, "Ookla", NDPI_PROTOCOL_OOKLA, NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_SAFE },
|
||||
{ ".speedtest.net", NULL, "\\.speedtest" TLD, "Ookla", NDPI_PROTOCOL_OOKLA, NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_SAFE },
|
||||
|
||||
{ "ntop.org", NULL, "ntop\\.org$", "ntop", NDPI_PROTOCOL_NTOP, NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_SAFE },
|
||||
|
||||
{ "docs.googleusercontent.com", NULL, "docs\\.googleusercontent" TLD, "GoogleDocs", NDPI_PROTOCOL_GOOGLE_DOCS, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ "docs.googleusercontent.com", NULL, "docs.googleusercontent" TLD, "GoogleDocs", NDPI_PROTOCOL_GOOGLE_DOCS, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ "docs.google.com", NULL, "docs.google" TLD, "GoogleDocs", NDPI_PROTOCOL_GOOGLE_DOCS, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
|
||||
@@ -8106,6 +8103,7 @@ ndpi_protocol_match host_match[] = {
|
||||
{ "drive.google.com", NULL, "drive.google" TLD, "GoogleDrive", NDPI_PROTOCOL_GOOGLE_DRIVE, NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
|
||||
{ "android.clients.google.com", NULL, "android\\.clients\\.google" TLD, "PlayStore", NDPI_PROTOCOL_PLAYSTORE, NDPI_PROTOCOL_CATEGORY_SW_UPDATE, NDPI_PROTOCOL_SAFE },
|
||||
{ "ggpht.com", NULL, "ggpht" TLD, "PlayStore", NDPI_PROTOCOL_PLAYSTORE, NDPI_PROTOCOL_CATEGORY_SW_UPDATE, NDPI_PROTOCOL_SAFE },
|
||||
|
||||
/*
|
||||
See https://better.fyi/trackers/
|
||||
@@ -8138,7 +8136,7 @@ ndpi_protocol_match host_match[] = {
|
||||
{ "google-analytics.", NULL, "google-analytics\\.", "Google", NDPI_PROTOCOL_GOOGLE, NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_TRACKER_ADS },
|
||||
{ "gtv1.com", NULL, "gtv1" TLD, "Google", NDPI_PROTOCOL_GOOGLE, NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
|
||||
/* Google Hangout */
|
||||
/* Google Hangout */
|
||||
{ "images2-hangout-opensocial.googleusercontent.com", NULL, "images2-hangout-opensocial\\.googleusercontent" TLD, "GoogleHangout", NDPI_PROTOCOL_HANGOUT, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
|
||||
/* Google Services */
|
||||
@@ -8164,7 +8162,6 @@ ndpi_protocol_match host_match[] = {
|
||||
{ "google.", NULL, "google" TLD, "Google", NDPI_PROTOCOL_GOOGLE, NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_SAFE },
|
||||
{ ".google.", NULL, NULL, "Google", NDPI_PROTOCOL_GOOGLE, NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_SAFE },
|
||||
{ ".gstatic.com", NULL, "\\.gstatic" TLD, "Google", NDPI_PROTOCOL_GOOGLE, NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_SAFE },
|
||||
{ "ggpht.com", NULL, "ggpht" TLD, "Google", NDPI_PROTOCOL_GOOGLE, NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_SAFE },
|
||||
|
||||
{ "mail.outlook.com", NULL, "mail\\.outlook" TLD, "Hotmail", NDPI_PROTOCOL_HOTMAIL, NDPI_PROTOCOL_CATEGORY_MAIL, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
|
||||
@@ -8220,6 +8217,7 @@ ndpi_protocol_match host_match[] = {
|
||||
{ ".googlevideo.com", NULL, "\\.googlevideo" TLD, "YouTube", NDPI_PROTOCOL_YOUTUBE, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||
{ ".ytimg.com", NULL, "\\.ytimg" TLD, "YouTube", NDPI_PROTOCOL_YOUTUBE, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||
{ "youtube-nocookie.", NULL, "youtube-nocookie" TLD, "YouTube", NDPI_PROTOCOL_YOUTUBE, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||
{ "ggpht.com", NULL, "ggpht" TLD, "YouTube", NDPI_PROTOCOL_YOUTUBE, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||
|
||||
{ ".vevo.com", NULL, "\\.vevo" TLD, "Vevo", NDPI_PROTOCOL_VEVO, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||
|
||||
@@ -8227,7 +8225,6 @@ ndpi_protocol_match host_match[] = {
|
||||
{ "audio-fa.scdn.co", NULL, "audio-fa\\.scdn" TLD, "Spotify", NDPI_PROTOCOL_SPOTIFY, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||
|
||||
{ "edge-mqtt.facebook.com", NULL, "edge-mqtt\\.facebook" TLD, "Messenger", NDPI_PROTOCOL_MESSENGER, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_FUN },
|
||||
{ "messenger.com", NULL, "messenger\\.com" TLD, "Messenger", NDPI_PROTOCOL_MESSENGER, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_FUN },
|
||||
|
||||
{ ".pandora.com", NULL, "\\.pandora" TLD, "Pandora", NDPI_PROTOCOL_PANDORA, NDPI_PROTOCOL_CATEGORY_STREAMING, NDPI_PROTOCOL_FUN },
|
||||
|
||||
@@ -8330,8 +8327,11 @@ ndpi_protocol_match host_match[] = {
|
||||
/* Detected "slack-assets2.s3-us-west-2.amazonaws.com.". Omitted "*amazonaws.com" CDN, but no generic pattern to use on first part */
|
||||
{ "slack-assets2.s3-", NULL, "slack-assets2\\.s3-", "Slack", NDPI_PROTOCOL_SLACK, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
|
||||
{ "wechat.com", NULL, "wechat\\.com" TLD, "WeChat", NDPI_PROTOCOL_WECHAT, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN },
|
||||
|
||||
{ "zhiliaoapp.com", NULL, "zhiliaoapp" TLD, "Musical.ly", NDPI_PROTOCOL_MUSICALLY, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN },
|
||||
{ "muscdn.com", NULL, "muscdn" TLD, "Musical.ly", NDPI_PROTOCOL_MUSICALLY, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN },
|
||||
{ "livelycdn.com", NULL, "livelycdn" TLD, "Musical.ly", NDPI_PROTOCOL_MUSICALLY, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN },
|
||||
{ "direct.ly", NULL, "direct\\.ly$", "Musical.ly", NDPI_PROTOCOL_MUSICALLY, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN },
|
||||
|
||||
{ "github.com", NULL, "github" TLD, "Github", NDPI_PROTOCOL_GITHUB, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ ".github.com", NULL, "\\.github" TLD, "Github", NDPI_PROTOCOL_GITHUB, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ "github.io", NULL, NULL, "Github", NDPI_PROTOCOL_GITHUB, NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
@@ -8394,7 +8394,7 @@ ndpi_protocol_match host_match[] = {
|
||||
than by protocol id. They are bound to a generic protocol (NDPI_PROTOCOL_GENERIC) and placed onto the right category
|
||||
*/
|
||||
{ "quickplay.com", NULL, "quickplay" TLD, "QuickPlay", NDPI_PROTOCOL_GENERIC, NDPI_PROTOCOL_CATEGORY_STREAMING, NDPI_PROTOCOL_FUN },
|
||||
|
||||
|
||||
{ ".iqiyi.com", NULL, "\\.iqiyi" TLD, "iQIYI", NDPI_PROTOCOL_GENERIC, NDPI_PROTOCOL_CATEGORY_STREAMING, NDPI_PROTOCOL_FUN },
|
||||
{ ".qiyi.com", NULL, "\\.qiyi" TLD, "iQIYI", NDPI_PROTOCOL_GENERIC, NDPI_PROTOCOL_CATEGORY_STREAMING, NDPI_PROTOCOL_FUN },
|
||||
{ ".71.am", NULL, "\\.71" TLD, "iQIYI", NDPI_PROTOCOL_GENERIC, NDPI_PROTOCOL_CATEGORY_STREAMING, NDPI_PROTOCOL_FUN },
|
||||
@@ -8417,11 +8417,6 @@ ndpi_protocol_match host_match[] = {
|
||||
{ "showmax.com", NULL, "showmax" TLD, "Showmax", NDPI_PROTOCOL_GENERIC, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||
{ "showmax.akamaized.net", NULL, "showmax\\.akamaized" TLD, "Showmax", NDPI_PROTOCOL_GENERIC, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||
|
||||
{ "snapcraft.io", NULL, "snapcraft\\.io" TLD, "UbuntuONE", NDPI_PROTOCOL_UBUNTUONE, NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ "ubuntu.com", NULL, "ubuntu\\.com" TLD, "UbuntuONE", NDPI_PROTOCOL_UBUNTUONE, NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
|
||||
{ "signal.org", NULL, "signal\\.org" TLD, "Signal", NDPI_PROTOCOL_SIGNAL, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ "whispersystems.org", NULL, "whispersystems\\.org" TLD, "Signal", NDPI_PROTOCOL_SIGNAL, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ NULL, NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
@@ -8546,13 +8541,12 @@ static const char *ndpi_en_bigrams[] = {
|
||||
|
||||
static const char *ndpi_en_impossible_bigrams[] = {
|
||||
"bk", "bq", "bx", "cb", "cf", "cg", "cj", "cp", "cv", "cw", "cx", "dx", "fk", "fq", "fv", "fx", /* "ee", removed it can be found in 'meeting' */
|
||||
"fz", "gq", "gv", "gx", "hh", "hk", "hv", "hx", "hz", "iy", "jb", /* "jc", jcrew.com */ "jd", "jf", "jg", "jh", "jk",
|
||||
"fz", "gq", "gv", "gx", "hh", "hk", "hv", "hx", "hz", "iy", "jb", "jc", "jd", "jf", "jg", "jh", "jk",
|
||||
"jl", "jm", "jn", "jp", "jq", "jr", /* "js", */ "jt", "jv", "jw", "jx", "jy", "jz", "kg", "kq", "kv", "kx",
|
||||
"kz", "lq", "lx", /* "mg" tamgrt.com , */ "mj", "mq", "mx", "mz", "pq", "pv", "px", "qb", "qc", "qd", "qe", "qf", "ii",
|
||||
"kz", "lq", "lx", "mg", "mj", "mq", "mx", "mz", "pq", "pv", "px", "qb", "qc", "qd", "qe", "qf", "ii",
|
||||
"qg", "qh", "qj", "qk", "ql", "qm", "qn", "qo", "qp", "qr", "qs", "qt", "qv", "qw", "qx", "qy", "uu",
|
||||
"qz", "sx", "sz", "tq", "tx", "vb", "vc", "vd", "vf", "vg", "vh", "vj", "vm", "vn", /* "vp", Removed for vpbank.com */ "bw", /* "vk", "zr" Removed for kavkazr */
|
||||
"vq", "vt", "vw", "vx", "vz", "wq", "wv", "wx", "wz", /* "xb", foxbusiness.com */
|
||||
"xg", "xj", "xk", "xv", "xz", "xw", "yd", /*"yp", Removed for paypal */
|
||||
"qz", "sx", "sz", "tq", "tx", "vb", "vc", "vd", "vf", "vg", "vh", "vj", "vm", "vn", "vp", "bw", /* "vk", "zr" Removed for kavkazr */
|
||||
"vq", "vt", "vw", "vx", "vz", "wq", "wv", "wx", "wz", "xb", "xg", "xj", "xk", "xv", "xz", "xw", "yd", /*"yp", Removed for paypal */
|
||||
"yj", "yq", "yv", "yz", "yw", "zb", "zc", "zg", "zh", "zj", "zn", "zq", "zs", "zx", "wh", "wk",
|
||||
"wb", "zk", "kp", "zk", "xy",
|
||||
NULL };
|
||||
|
||||
+405
-831
File diff suppressed because it is too large
Load Diff
@@ -31,22 +31,20 @@ static void ndpi_check_apple_push(struct ndpi_detection_module_struct *ndpi_stru
|
||||
struct ndpi_flow_struct *flow) {
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
|
||||
if(packet->iph) {
|
||||
/* https://support.apple.com/en-us/HT203609 */
|
||||
if(((ntohl(packet->iph->saddr) & 0xFF000000 /* 255.0.0.0 */) == 0x11000000 /* 17.0.0.0/8 */)
|
||||
|| ((ntohl(packet->iph->daddr) & 0xFF000000 /* 255.0.0.0 */) == 0x11000000 /* 17.0.0.0/8 */)) {
|
||||
u_int16_t apple_push_port = ntohs(5223);
|
||||
u_int16_t notification_apn_port = ntohs(2195);
|
||||
u_int16_t apn_feedback_port = ntohs(2196);
|
||||
|
||||
if(((packet->tcp->source == apple_push_port) || (packet->tcp->dest == apple_push_port))
|
||||
|| ((packet->tcp->source == notification_apn_port) || (packet->tcp->dest == notification_apn_port))
|
||||
|| ((packet->tcp->source == apn_feedback_port) || (packet->tcp->dest == apn_feedback_port))
|
||||
) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found apple_push\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_APPLE_PUSH, NDPI_PROTOCOL_UNKNOWN);
|
||||
return;
|
||||
}
|
||||
/* https://support.apple.com/en-us/HT203609 */
|
||||
if(((ntohl(packet->iph->saddr) & 0xFF000000 /* 255.0.0.0 */) == 0x11000000 /* 17.0.0.0/8 */)
|
||||
|| ((ntohl(packet->iph->daddr) & 0xFF000000 /* 255.0.0.0 */) == 0x11000000 /* 17.0.0.0/8 */)) {
|
||||
u_int16_t apple_push_port = ntohs(5223);
|
||||
u_int16_t notification_apn_port = ntohs(2195);
|
||||
u_int16_t apn_feedback_port = ntohs(2196);
|
||||
|
||||
if(((packet->tcp->source == apple_push_port) || (packet->tcp->dest == apple_push_port))
|
||||
|| ((packet->tcp->source == notification_apn_port) || (packet->tcp->dest == notification_apn_port))
|
||||
|| ((packet->tcp->source == apn_feedback_port) || (packet->tcp->dest == apn_feedback_port))
|
||||
) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found apple_push\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_APPLE_PUSH, NDPI_PROTOCOL_UNKNOWN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ void ndpi_search_coap (struct ndpi_detection_module_struct *ndpi_struct,
|
||||
// check values in header
|
||||
if(h->version == 1) {
|
||||
if(h->type == CON || h->type == NO_CON || h->type == ACK || h->type == RST ) {
|
||||
if(h->tkl < 8) {
|
||||
if(h->tkl == 0 || h->tkl < 8) {
|
||||
if((h->code >= 0 && h->code <= 5) || (h->code >= 65 && h->code <= 69) ||
|
||||
(h->code >= 128 && h->code <= 134) || (h->code >= 140 && h->code <= 143) ||
|
||||
(h->code >= 160 && h->code <= 165)) {
|
||||
|
||||
+25
-27
@@ -36,9 +36,9 @@
|
||||
|
||||
static u_int16_t get16(int *i, const u_int8_t *payload) {
|
||||
u_int16_t v = *(u_int16_t*)&payload[*i];
|
||||
|
||||
|
||||
(*i) += 2;
|
||||
|
||||
|
||||
return(ntohs(v));
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ static u_int getNameLength(u_int i, const u_int8_t *payload, u_int payloadLen) {
|
||||
else {
|
||||
u_int8_t len = payload[i];
|
||||
u_int8_t off = len + 1;
|
||||
|
||||
|
||||
if(off == 0) /* Bad packet */
|
||||
return(0);
|
||||
else
|
||||
@@ -63,27 +63,25 @@ static u_int getNameLength(u_int i, const u_int8_t *payload, u_int payloadLen) {
|
||||
/* *********************************************** */
|
||||
|
||||
void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
|
||||
int x, payload_offset;
|
||||
int x;
|
||||
u_int8_t is_query;
|
||||
u_int16_t s_port = 0, d_port = 0;
|
||||
|
||||
|
||||
NDPI_LOG_DBG(ndpi_struct, "search DNS\n");
|
||||
|
||||
if(flow->packet.udp != NULL) {
|
||||
s_port = ntohs(flow->packet.udp->source);
|
||||
d_port = ntohs(flow->packet.udp->dest);
|
||||
payload_offset = 0;
|
||||
x = 0;
|
||||
} else if(flow->packet.tcp != NULL) /* pkt size > 512 bytes */ {
|
||||
s_port = ntohs(flow->packet.tcp->source);
|
||||
d_port = ntohs(flow->packet.tcp->dest);
|
||||
payload_offset = 2;
|
||||
x = 2;
|
||||
} else {
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
|
||||
x = payload_offset;
|
||||
|
||||
if((s_port == 53 || d_port == 53 || d_port == 5355)
|
||||
&& (flow->packet.payload_packet_len > sizeof(struct ndpi_dns_packet_header)+x)) {
|
||||
struct ndpi_dns_packet_header dns_header;
|
||||
@@ -120,7 +118,7 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
if(flow->packet.payload[x] == '\0') {
|
||||
x++;
|
||||
flow->protos.dns.query_type = get16(&x, flow->packet.payload);
|
||||
#ifdef DNS_DEBUG
|
||||
#ifdef DNS_DEBUG
|
||||
NDPI_LOG_DBG2(ndpi_struct, "query_type=%2d\n", flow->protos.dns.query_type);
|
||||
#endif
|
||||
break;
|
||||
@@ -130,6 +128,7 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
}
|
||||
} else
|
||||
invalid = 1;
|
||||
|
||||
} else {
|
||||
/* DNS Reply */
|
||||
|
||||
@@ -141,15 +140,15 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
|| ((dns_header.additional_rrs > 0) && (dns_header.additional_rrs <= NDPI_MAX_DNS_REQUESTS)))
|
||||
) {
|
||||
/* This is a good reply */
|
||||
if(ndpi_struct->dns_dont_dissect_response == 0) {
|
||||
if(ndpi_struct->dns_dissect_response) {
|
||||
x++;
|
||||
|
||||
|
||||
if(flow->packet.payload[x] != '\0') {
|
||||
while((x < flow->packet.payload_packet_len)
|
||||
&& (flow->packet.payload[x] != '\0')) {
|
||||
x++;
|
||||
}
|
||||
|
||||
|
||||
x++;
|
||||
}
|
||||
|
||||
@@ -161,7 +160,7 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
|
||||
for(num = 0; num < dns_header.num_answers; num++) {
|
||||
u_int16_t data_len;
|
||||
|
||||
|
||||
if((x+6) >= flow->packet.payload_packet_len) {
|
||||
break;
|
||||
}
|
||||
@@ -170,7 +169,7 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
break;
|
||||
} else
|
||||
x += data_len;
|
||||
|
||||
|
||||
rsp_type = get16(&x, flow->packet.payload);
|
||||
flow->protos.dns.rsp_type = rsp_type;
|
||||
break;
|
||||
@@ -186,7 +185,8 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
}
|
||||
|
||||
/* extract host name server */
|
||||
int j = 0, max_len = sizeof(flow->host_server_name)-1, off = sizeof(struct ndpi_dns_packet_header) + 1 + payload_offset;
|
||||
int j = 0, max_len = sizeof(flow->host_server_name)-1, off = sizeof(struct ndpi_dns_packet_header) + 1;
|
||||
|
||||
while(off < flow->packet.payload_packet_len && flow->packet.payload[off] != '\0') {
|
||||
flow->host_server_name[j] = flow->packet.payload[off];
|
||||
if(j < max_len) {
|
||||
@@ -199,11 +199,9 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
off++;
|
||||
}
|
||||
|
||||
if(is_query && (ndpi_struct->dns_dont_dissect_response == 0)) {
|
||||
// dpi_set_detected_protocol(ndpi_struct, flow, (d_port == 5355) ? NDPI_PROTOCOL_LLMNR : NDPI_PROTOCOL_DNS, NDPI_PROTOCOL_UNKNOWN);
|
||||
return; /* The response will set the verdict */
|
||||
}
|
||||
|
||||
if(is_query && ndpi_struct->dns_dissect_response)
|
||||
return; /* The response will set the verdict */
|
||||
|
||||
flow->host_server_name[j] = '\0';
|
||||
|
||||
flow->protos.dns.num_queries = (u_int8_t)dns_header.num_queries,
|
||||
@@ -211,33 +209,33 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
|
||||
if(j > 0) {
|
||||
ndpi_protocol_match_result ret_match;
|
||||
|
||||
ndpi_match_host_subprotocol(ndpi_struct, flow,
|
||||
|
||||
ndpi_match_host_subprotocol(ndpi_struct, flow,
|
||||
(char *)flow->host_server_name,
|
||||
strlen((const char*)flow->host_server_name),
|
||||
&ret_match,
|
||||
NDPI_PROTOCOL_DNS);
|
||||
}
|
||||
|
||||
|
||||
#ifdef DNS_DEBUG
|
||||
NDPI_LOG_DBG2(ndpi_struct, "[num_queries=%d][num_answers=%d][reply_code=%u][rsp_type=%u][host_server_name=%s]\n",
|
||||
flow->protos.dns.num_queries, flow->protos.dns.num_answers,
|
||||
flow->protos.dns.reply_code, flow->protos.dns.rsp_type, flow->host_server_name
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
if(flow->packet.detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN) {
|
||||
/**
|
||||
Do not set the protocol with DNS if ndpi_match_host_subprotocol() has
|
||||
matched a subprotocol
|
||||
**/
|
||||
NDPI_LOG_INFO(ndpi_struct, "found DNS\n");
|
||||
NDPI_LOG_INFO(ndpi_struct, "found DNS\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, (d_port == 5355) ? NDPI_PROTOCOL_LLMNR : NDPI_PROTOCOL_DNS, NDPI_PROTOCOL_UNKNOWN);
|
||||
} else {
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void init_dns_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask)
|
||||
|
||||
@@ -48,24 +48,14 @@ static void ndpi_check_dropbox(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
if(packet->udp != NULL) {
|
||||
u_int16_t dropbox_port = htons(DB_LSP_PORT);
|
||||
|
||||
if(packet->udp->dest == dropbox_port) {
|
||||
if(packet->udp->source == dropbox_port) {
|
||||
if(payload_len > 10) {
|
||||
if(ndpi_strnstr((const char *)packet->payload, "\"host_int\"", payload_len) != NULL) {
|
||||
|
||||
NDPI_LOG_INFO(ndpi_struct, "found dropbox\n");
|
||||
ndpi_int_dropbox_add_connection(ndpi_struct, flow, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(payload_len > 10) {
|
||||
if(ndpi_strnstr((const char *)packet->payload, "Bus17Cmd", payload_len) != NULL) {
|
||||
|
||||
NDPI_LOG_INFO(ndpi_struct, "found dropbox\n");
|
||||
ndpi_int_dropbox_add_connection(ndpi_struct, flow, 0);
|
||||
return;
|
||||
}
|
||||
if((packet->udp->source == dropbox_port)
|
||||
&& (packet->udp->dest == dropbox_port)) {
|
||||
if(payload_len > 2) {
|
||||
if(strncmp((const char *)packet->payload, "{\"host_int\"", 11) == 0) {
|
||||
|
||||
NDPI_LOG_INFO(ndpi_struct, "found dropbox\n");
|
||||
ndpi_int_dropbox_add_connection(ndpi_struct, flow, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,15 +53,12 @@ void ndpi_search_eaq(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
|
||||
if(packet->udp != NULL) {
|
||||
u_int32_t seq = (packet->payload[0] * 1000) + (packet->payload[1] * 100) + (packet->payload[2] * 10) + packet->payload[3];
|
||||
|
||||
|
||||
if(flow->l4.udp.eaq_pkt_id == 0)
|
||||
flow->l4.udp.eaq_sequence = seq;
|
||||
else {
|
||||
if( (flow->l4.udp.eaq_sequence != seq) &&
|
||||
((flow->l4.udp.eaq_sequence+1) != seq))
|
||||
break;
|
||||
else
|
||||
flow->l4.udp.eaq_sequence = seq;
|
||||
((flow->l4.udp.eaq_sequence+1) != seq)) break;
|
||||
}
|
||||
|
||||
if(++flow->l4.udp.eaq_pkt_id == 4) {
|
||||
@@ -69,8 +66,7 @@ void ndpi_search_eaq(struct ndpi_detection_module_struct *ndpi_struct, struct nd
|
||||
NDPI_LOG_INFO(ndpi_struct, "found eaq\n");
|
||||
ndpi_int_eaq_add_connection(ndpi_struct, flow);
|
||||
return;
|
||||
} else
|
||||
return;
|
||||
}
|
||||
}
|
||||
} while(0);
|
||||
|
||||
|
||||
+87
-88
@@ -35,122 +35,123 @@ static void ndpi_int_edonkey_add_connection(struct ndpi_detection_module_struct
|
||||
}
|
||||
|
||||
static int ndpi_edonkey_payload_check(const u_int8_t *data, u_int32_t len) {
|
||||
if((len >= 4) && (data[0] == 0xe3) && (data[2] == 0x00) && (data[3] == 0x00))
|
||||
return 1;
|
||||
|
||||
if((len >= 4) && (data[0] == 0xc5) && (data[2] == 0x00) && (data[3] == 0x00))
|
||||
return 1;
|
||||
if ((len >= 4) && (data[0] == 0xe3) && (data[2] == 0x00) && (data[3] == 0x00))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xe5) && (data[1] == 0x43))
|
||||
return 1;
|
||||
if ((len >= 4) && (data[0] == 0xc5) && (data[2] == 0x00) && (data[3] == 0x00))
|
||||
return 1;
|
||||
|
||||
if((len >= 4) && (data[0] == 0xe5) && (data[1] == 0x08) && (data[2] == 0x78) && (data[3] == 0xda))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xe5) && (data[1] == 0x43))
|
||||
return 1;
|
||||
|
||||
if ((len >= 4) && (data[0] == 0xe5) && (data[1] == 0x08) && (data[2] == 0x78) && (data[3] == 0xda))
|
||||
return 1;
|
||||
|
||||
if((len >= 4) && (data[0] == 0xe5) && (data[1] == 0x28) && (data[2] == 0x78) && (data[3] == 0xda))
|
||||
return 1;
|
||||
if ((len >= 4) && (data[0] == 0xe5) && (data[1] == 0x28) && (data[2] == 0x78) && (data[3] == 0xda))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xc5) && (data[1] == 0x90))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xc5) && (data[1] == 0x90))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xc5) && (data[1] == 0x91))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xc5) && (data[1] == 0x91))
|
||||
return 1;
|
||||
|
||||
if((len == 2) && (data[0] == 0xc5) && (data[1] == 0x92))
|
||||
return 1;
|
||||
if ((len == 2) && (data[0] == 0xc5) && (data[1] == 0x92))
|
||||
return 1;
|
||||
|
||||
if((len == 2) && (data[0] == 0xc5) && (data[1] == 0x93))
|
||||
return 1;
|
||||
if ((len == 2) && (data[0] == 0xc5) && (data[1] == 0x93))
|
||||
return 1;
|
||||
|
||||
if((len >= 38 && len <= 70) && (data[0] == 0xc5) && (data[1] == 0x94))
|
||||
return 1;
|
||||
if ((len >= 38 && len <= 70) && (data[0] == 0xc5) && (data[1] == 0x94))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x9a))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x9a))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x9b))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x9b))
|
||||
return 1;
|
||||
|
||||
if((len == 6) && (data[0] == 0xe3) && (data[1] == 0x96))
|
||||
return 1;
|
||||
if ((len == 6) && (data[0] == 0xe3) && (data[1] == 0x96))
|
||||
return 1;
|
||||
|
||||
if((len <= 34 && ((len - 2) % 4 == 0)) && (data[0] == 0xe3) && (data[1] == 0x97))
|
||||
return 1;
|
||||
if ((len <= 34 && ((len - 2) % 4 == 0)) && (data[0] == 0xe3) && (data[1] == 0x97))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x92))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x92))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x94))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x94))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x98))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x98))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x99))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xe3) && (data[1] == 0x99))
|
||||
return 1;
|
||||
|
||||
if((len == 6) && (data[0] == 0xe3) && (data[1] == 0xa2))
|
||||
return 1;
|
||||
if ((len == 6) && (data[0] == 0xe3) && (data[1] == 0xa2))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xe3) && (data[1] == 0xa3))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xe3) && (data[1] == 0xa3))
|
||||
return 1;
|
||||
|
||||
if((len == 27) && (data[0] == 0xe4) && (data[1] == 0x00))
|
||||
return 1;
|
||||
if ((len == 27) && (data[0] == 0xe4) && (data[1] == 0x00))
|
||||
return 1;
|
||||
|
||||
if((len == 529) && (data[0] == 0xe4) && (data[1] == 0x08))
|
||||
return 1;
|
||||
if ((len == 529) && (data[0] == 0xe4) && (data[1] == 0x08))
|
||||
return 1;
|
||||
|
||||
if((len == 18) && (data[0] == 0xe4) && (data[1] == 0x01) && (data[2] == 0x00) && (data[3] == 0x00))
|
||||
return 1;
|
||||
if ((len == 18) && (data[0] == 0xe4) && (data[1] == 0x01) && (data[2] == 0x00) && (data[3] == 0x00))
|
||||
return 1;
|
||||
|
||||
if((len == 523) && (data[0] == 0xe4) && (data[1] == 0x09))
|
||||
return 1;
|
||||
if ((len == 523) && (data[0] == 0xe4) && (data[1] == 0x09))
|
||||
return 1;
|
||||
|
||||
if((len == 35) && (data[0] == 0xe4) && (data[1] == 0x21))
|
||||
return 1;
|
||||
if ((len == 35) && (data[0] == 0xe4) && (data[1] == 0x21))
|
||||
return 1;
|
||||
|
||||
if((len == 19) && (data[0] == 0xe4) && (data[1] == 0x4b))
|
||||
return 1;
|
||||
if ((len == 19) && (data[0] == 0xe4) && (data[1] == 0x4b))
|
||||
return 1;
|
||||
|
||||
if((len >= 2) && (data[0] == 0xe4) && (data[1] == 0x11))
|
||||
return 1;
|
||||
if ((len >= 2) && (data[0] == 0xe4) && (data[1] == 0x11))
|
||||
return 1;
|
||||
|
||||
if((len == 22 || len == 38 || len == 28) && (data[0] == 0xe4) && (data[1] == 0x19))
|
||||
return 1;
|
||||
if ((len == 22 || len == 38 || len == 28) && (data[0] == 0xe4) && (data[1] == 0x19))
|
||||
return 1;
|
||||
|
||||
if((len == 35) && (data[0] == 0xe4) && (data[1] == 0x20))
|
||||
return 1;
|
||||
if ((len == 35) && (data[0] == 0xe4) && (data[1] == 0x20))
|
||||
return 1;
|
||||
|
||||
if((len == 27) && (data[0] == 0xe4) && (data[1] == 0x18))
|
||||
return 1;
|
||||
if ((len == 27) && (data[0] == 0xe4) && (data[1] == 0x18))
|
||||
return 1;
|
||||
|
||||
if((len == 27) && (data[0] == 0xe4) && (data[1] == 0x10))
|
||||
return 1;
|
||||
if ((len == 27) && (data[0] == 0xe4) && (data[1] == 0x10))
|
||||
return 1;
|
||||
|
||||
if((len == 6) && (data[0] == 0xe4) && (data[1] == 0x58))
|
||||
return 1;
|
||||
if ((len == 6) && (data[0] == 0xe4) && (data[1] == 0x58))
|
||||
return 1;
|
||||
|
||||
if((len == 4) && (data[0] == 0xe4) && (data[1] == 0x50))
|
||||
return 1;
|
||||
if ((len == 4) && (data[0] == 0xe4) && (data[1] == 0x50))
|
||||
return 1;
|
||||
|
||||
if((len == 36) && (data[0] == 0xe4) && (data[1] == 0x52))
|
||||
return 1;
|
||||
if ((len == 36) && (data[0] == 0xe4) && (data[1] == 0x52))
|
||||
return 1;
|
||||
|
||||
if((len == 48) && (data[0] == 0xe4) && (data[1] == 0x40))
|
||||
return 1;
|
||||
if ((len == 48) && (data[0] == 0xe4) && (data[1] == 0x40))
|
||||
return 1;
|
||||
|
||||
if((len == 225) && (data[0] == 0xe4) && (data[1] == 0x43))
|
||||
return 1;
|
||||
if ((len == 225) && (data[0] == 0xe4) && (data[1] == 0x43))
|
||||
return 1;
|
||||
|
||||
if((len == 19) && (data[0] == 0xe4) && (data[1] == 0x48))
|
||||
return 1;
|
||||
if ((len == 19) && (data[0] == 0xe4) && (data[1] == 0x48))
|
||||
return 1;
|
||||
|
||||
if((len == 119 || len == 69 || len == 294) && (data[0] == 0xe4) && (data[1] == 0x29))
|
||||
return 1;
|
||||
if ((len == 119 || len == 69 || len == 294) && (data[0] == 0xe4) && (data[1] == 0x29))
|
||||
return 1;
|
||||
|
||||
if((len == 119 || len == 69 || len == 294 || len == 44 || len == 269) && (data[0] == 0xe4) && (data[1] == 0x28))
|
||||
return 1;
|
||||
if ((len == 119 || len == 69 || len == 294 || len == 44 || len == 269) && (data[0] == 0xe4) && (data[1] == 0x28))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -158,20 +159,18 @@ static int ndpi_edonkey_payload_check(const u_int8_t *data, u_int32_t len) {
|
||||
static void ndpi_check_edonkey(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
u_int32_t payload_len = packet->payload_packet_len;
|
||||
|
||||
|
||||
/* Break after 20 packets. */
|
||||
if(flow->packet_counter > 20) {
|
||||
if (flow->packet_counter > 20) {
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
|
||||
if(payload_len == 0) return;
|
||||
|
||||
/* Check if we so far detected the protocol in the request or not. */
|
||||
if(flow->edonkey_stage == 0) {
|
||||
if (flow->edonkey_stage == 0) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "EDONKEY stage 0: \n");
|
||||
|
||||
if(ndpi_edonkey_payload_check(packet->payload, payload_len)) {
|
||||
if (ndpi_edonkey_payload_check(packet->payload, payload_len)) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "Possible EDONKEY request detected, we will look further for the response\n");
|
||||
|
||||
/* Encode the direction of the packet in the stage, so we will know when we need to look for the response packet. */
|
||||
@@ -182,12 +181,12 @@ static void ndpi_check_edonkey(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
NDPI_LOG_DBG2(ndpi_struct, "EDONKEY stage %u: \n", flow->edonkey_stage);
|
||||
|
||||
/* At first check, if this is for sure a response packet (in another direction. If not, do nothing now and return. */
|
||||
if((flow->edonkey_stage - packet->packet_direction) == 1) {
|
||||
if ((flow->edonkey_stage - packet->packet_direction) == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* This is a packet in another direction. Check if we find the proper response. */
|
||||
if((payload_len == 0) || (ndpi_edonkey_payload_check(packet->payload, payload_len))) {
|
||||
if ((payload_len == 0) || (ndpi_edonkey_payload_check(packet->payload, payload_len))) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found EDONKEY\n");
|
||||
ndpi_int_edonkey_add_connection(ndpi_struct, flow);
|
||||
} else {
|
||||
@@ -204,8 +203,8 @@ void ndpi_search_edonkey(struct ndpi_detection_module_struct *ndpi_struct, struc
|
||||
NDPI_LOG_DBG(ndpi_struct, "search EDONKEY\n");
|
||||
|
||||
/* skip marked packets */
|
||||
if(packet->detected_protocol_stack[0] != NDPI_PROTOCOL_EDONKEY) {
|
||||
if(packet->tcp_retransmission == 0) {
|
||||
if (packet->detected_protocol_stack[0] != NDPI_PROTOCOL_EDONKEY) {
|
||||
if (packet->tcp_retransmission == 0) {
|
||||
ndpi_check_edonkey(ndpi_struct, flow);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@ void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct n
|
||||
/* H323 */
|
||||
if(packet->payload_packet_len >= 3
|
||||
&& (packet->payload[0] == 0x03)
|
||||
&& (packet->payload[1] == 0x00)) {
|
||||
&& (packet->payload[1] == 0x00)
|
||||
&& (packet->payload[2] == 0x00)) {
|
||||
struct tpkt *t = (struct tpkt*)packet->payload;
|
||||
u_int16_t len = ntohs(t->len);
|
||||
|
||||
|
||||
+129
-174
@@ -26,43 +26,29 @@
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_HTTP
|
||||
|
||||
#include "ndpi_api.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
/* global variables used for 1kxun protocol and iqiyi service */
|
||||
|
||||
static void ndpi_int_http_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int16_t category) {
|
||||
#ifdef DEBUG
|
||||
printf("[%s] [http_dont_dissect_response: %u]->> %s\n", __FUNCTION__,
|
||||
ndpi_struct->http_dont_dissect_response, flow->http.response_status_code);
|
||||
#endif
|
||||
|
||||
|
||||
if(flow->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN) {
|
||||
/* This is HTTP and it is not a sub protocol (e.g. skype or dropbox) */
|
||||
|
||||
ndpi_search_tcp_or_udp(ndpi_struct, flow);
|
||||
|
||||
/* If no custom protocol has been detected */
|
||||
|
||||
if(flow->guessed_host_protocol_id != NDPI_PROTOCOL_UNKNOWN) {
|
||||
ndpi_int_reset_protocol(flow);
|
||||
flow->http_upper_protocol = flow->guessed_host_protocol_id, flow->http_lower_protocol = NDPI_PROTOCOL_HTTP;
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, flow->guessed_host_protocol_id, NDPI_PROTOCOL_HTTP);
|
||||
} else
|
||||
flow->http_upper_protocol = NDPI_PROTOCOL_HTTP, flow->http_lower_protocol = NDPI_PROTOCOL_UNKNOWN;
|
||||
|
||||
if(ndpi_struct->http_dont_dissect_response)
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, flow->http_upper_protocol, flow->http_lower_protocol);
|
||||
else {
|
||||
flow->detected_protocol_stack[0] = NDPI_PROTOCOL_UNKNOWN, flow->detected_protocol_stack[1] = NDPI_PROTOCOL_UNKNOWN;
|
||||
flow->packet.detected_protocol_stack[0] = NDPI_PROTOCOL_UNKNOWN, flow->packet.detected_protocol_stack[1] = NDPI_PROTOCOL_UNKNOWN;
|
||||
}
|
||||
} else {
|
||||
if((!ndpi_struct->http_dont_dissect_response) && (flow->http.response_status_code == 0)) {
|
||||
flow->http_upper_protocol = flow->detected_protocol_stack[0], flow->http_lower_protocol = flow->detected_protocol_stack[1];
|
||||
flow->detected_protocol_stack[0] = NDPI_PROTOCOL_UNKNOWN, flow->detected_protocol_stack[1] = NDPI_PROTOCOL_UNKNOWN;
|
||||
flow->packet.detected_protocol_stack[0] = NDPI_PROTOCOL_UNKNOWN, flow->packet.detected_protocol_stack[1] = NDPI_PROTOCOL_UNKNOWN;
|
||||
}
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_HTTP, NDPI_PROTOCOL_UNKNOWN);
|
||||
|
||||
flow->http_detected = 1, flow->guessed_category = category;
|
||||
}
|
||||
|
||||
flow->http_detected = 1, flow->guessed_category = category;
|
||||
}
|
||||
|
||||
#ifdef NDPI_CONTENT_CATEGORY_FLASH
|
||||
@@ -93,7 +79,7 @@ static void avi_check_http_payload(struct ndpi_detection_module_struct *ndpi_str
|
||||
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "called avi_check_http_payload: %u %u %u\n",
|
||||
packet->empty_line_position_set, flow->l4.tcp.http_empty_line_seen, packet->empty_line_position);
|
||||
packet->empty_line_position_set, flow->l4.tcp.http_empty_line_seen, packet->empty_line_position);
|
||||
|
||||
if(packet->empty_line_position_set == 0 && flow->l4.tcp.http_empty_line_seen == 0)
|
||||
return;
|
||||
@@ -139,7 +125,7 @@ static void teamviewer_check_http_payload(struct ndpi_detection_module_struct *n
|
||||
const u_int8_t *pos;
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "called teamviewer_check_http_payload: %u %u %u\n",
|
||||
packet->empty_line_position_set, flow->l4.tcp.http_empty_line_seen, packet->empty_line_position);
|
||||
packet->empty_line_position_set, flow->l4.tcp.http_empty_line_seen, packet->empty_line_position);
|
||||
|
||||
if(packet->empty_line_position_set == 0 || (packet->empty_line_position + 5) > (packet->payload_packet_len))
|
||||
return;
|
||||
@@ -185,10 +171,10 @@ static void setHttpUserAgent(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
static void parseHttpSubprotocol(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
|
||||
if((flow->l4.tcp.http_stage == 0) || (flow->http.url && flow->http_detected)) {
|
||||
char *double_col = strchr((char*)flow->host_server_name, ':');
|
||||
ndpi_protocol_match_result ret_match;
|
||||
|
||||
if(double_col) double_col[0] = '\0';
|
||||
char *double_col = strchr((char*)flow->host_server_name, ':');
|
||||
ndpi_protocol_match_result ret_match;
|
||||
|
||||
if(double_col) double_col[0] = '\0';
|
||||
|
||||
/**
|
||||
NOTE
|
||||
@@ -212,14 +198,6 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
u_int8_t a;
|
||||
|
||||
if((!ndpi_struct->http_dont_dissect_response) && flow->http_detected && (flow->http.response_status_code != 0)) {
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, flow->http_upper_protocol, flow->http_lower_protocol);
|
||||
#ifdef DEBUG
|
||||
printf("[%s] [http_dont_dissect_response: %u]->> %s\n",
|
||||
__FUNCTION__, ndpi_struct->http_dont_dissect_response, flow->http.response_status_code);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(NDPI_PROTOCOL_1KXUN) || defined(NDPI_PROTOCOL_IQIYI)
|
||||
/* PPStream */
|
||||
@@ -299,8 +277,8 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
if(packet->user_agent_line.ptr != NULL && packet->user_agent_line.len != 0) {
|
||||
/**
|
||||
Format examples:
|
||||
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) ....
|
||||
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
|
||||
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) ....
|
||||
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
|
||||
*/
|
||||
if(packet->user_agent_line.len > 7) {
|
||||
char ua[256];
|
||||
@@ -330,22 +308,22 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
if(token && (token[0] == ' ')) token++; /* Skip space */
|
||||
|
||||
if(token
|
||||
&& ((strcmp(token, "U") == 0)
|
||||
|| (strncmp(token, "MSIE", 4) == 0))) {
|
||||
token = strsep(&parent, ";");
|
||||
if(token && (token[0] == ' ')) token++; /* Skip space */
|
||||
|
||||
if(token && (strncmp(token, "Update", 6) == 0)) {
|
||||
token = strsep(&parent, ";");
|
||||
|
||||
if(token && (token[0] == ' ')) token++; /* Skip space */
|
||||
|
||||
if(token && (strncmp(token, "AOL", 3) == 0)) {
|
||||
|
||||
&& ((strcmp(token, "U") == 0)
|
||||
|| (strncmp(token, "MSIE", 4) == 0))) {
|
||||
token = strsep(&parent, ";");
|
||||
if(token && (token[0] == ' ')) token++; /* Skip space */
|
||||
}
|
||||
}
|
||||
|
||||
if(token && (strncmp(token, "Update", 6) == 0)) {
|
||||
token = strsep(&parent, ";");
|
||||
|
||||
if(token && (token[0] == ' ')) token++; /* Skip space */
|
||||
|
||||
if(token && (strncmp(token, "AOL", 3) == 0)) {
|
||||
|
||||
token = strsep(&parent, ";");
|
||||
if(token && (token[0] == ' ')) token++; /* Skip space */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +340,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
}
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "User Agent Type line found %.*s\n",
|
||||
packet->user_agent_line.len, packet->user_agent_line.ptr);
|
||||
packet->user_agent_line.len, packet->user_agent_line.ptr);
|
||||
}
|
||||
|
||||
/* check for host line */
|
||||
@@ -370,37 +348,37 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
u_int len;
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "HOST line found %.*s\n",
|
||||
packet->host_line.len, packet->host_line.ptr);
|
||||
packet->host_line.len, packet->host_line.ptr);
|
||||
|
||||
/* call ndpi_match_host_subprotocol to see if there is a match with known-host HTTP subprotocol */
|
||||
if((ndpi_struct->http_dont_dissect_response) || flow->http_detected) {
|
||||
ndpi_protocol_match_result ret_match;
|
||||
|
||||
|
||||
ndpi_match_host_subprotocol(ndpi_struct, flow,
|
||||
(char*)packet->host_line.ptr,
|
||||
packet->host_line.len,
|
||||
&ret_match,
|
||||
NDPI_PROTOCOL_HTTP);
|
||||
}
|
||||
|
||||
|
||||
/* Copy result for nDPI apps */
|
||||
if(!ndpi_struct->disable_metadata_export) {
|
||||
len = ndpi_min(packet->host_line.len, sizeof(flow->host_server_name)-1);
|
||||
strncpy((char*)flow->host_server_name, (char*)packet->host_line.ptr, len);
|
||||
flow->host_server_name[len] = '\0';
|
||||
}
|
||||
|
||||
|
||||
flow->server_id = flow->dst;
|
||||
|
||||
if(packet->forwarded_line.ptr) {
|
||||
len = ndpi_min(packet->forwarded_line.len, sizeof(flow->protos.http.nat_ip)-1);
|
||||
if(!ndpi_struct->disable_metadata_export) {
|
||||
strncpy((char*)flow->protos.http.nat_ip, (char*)packet->forwarded_line.ptr, len);
|
||||
flow->protos.http.nat_ip[len] = '\0';
|
||||
}
|
||||
len = ndpi_min(packet->forwarded_line.len, sizeof(flow->protos.http.nat_ip)-1);
|
||||
if(!ndpi_struct->disable_metadata_export) {
|
||||
strncpy((char*)flow->protos.http.nat_ip, (char*)packet->forwarded_line.ptr, len);
|
||||
flow->protos.http.nat_ip[len] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
if(!ndpi_struct->http_dont_dissect_response)
|
||||
if(ndpi_struct->http_dont_dissect_response)
|
||||
parseHttpSubprotocol(ndpi_struct, flow);
|
||||
|
||||
/**
|
||||
@@ -425,28 +403,26 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
&& ((ndpi_struct->http_dont_dissect_response) || flow->http_detected)
|
||||
&& (packet->http_origin.len > 0)) {
|
||||
ndpi_protocol_match_result ret_match;
|
||||
|
||||
|
||||
ndpi_match_host_subprotocol(ndpi_struct, flow,
|
||||
(char *)packet->http_origin.ptr,
|
||||
packet->http_origin.len,
|
||||
&ret_match,
|
||||
NDPI_PROTOCOL_HTTP);
|
||||
}
|
||||
|
||||
|
||||
if(flow->detected_protocol_stack[0] != NDPI_PROTOCOL_UNKNOWN) {
|
||||
if(packet->detected_protocol_stack[0] != NDPI_PROTOCOL_HTTP) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found HTTP/%s\n",
|
||||
ndpi_get_proto_name(ndpi_struct, packet->detected_protocol_stack[0]));
|
||||
NDPI_LOG_INFO(ndpi_struct, "found HTTP/%s\n",
|
||||
ndpi_get_proto_name(ndpi_struct, packet->detected_protocol_stack[0]));
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, packet->detected_protocol_stack[0]);
|
||||
return; /* We have identified a sub-protocol so we're done */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(!ndpi_struct->http_dont_dissect_response && flow->http_detected)
|
||||
parseHttpSubprotocol(ndpi_struct, flow);
|
||||
#endif
|
||||
|
||||
if(flow->guessed_protocol_id == NDPI_PROTOCOL_UNKNOWN)
|
||||
flow->guessed_protocol_id = NDPI_PROTOCOL_HTTP;
|
||||
@@ -454,7 +430,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
/* check for accept line */
|
||||
if(packet->accept_line.ptr != NULL) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "Accept line found %.*s\n",
|
||||
packet->accept_line.len, packet->accept_line.ptr);
|
||||
packet->accept_line.len, packet->accept_line.ptr);
|
||||
if(NDPI_COMPARE_PROTOCOL_TO_BITMASK(ndpi_struct->detection_bitmask,
|
||||
NDPI_PROTOCOL_RTSP) != 0) {
|
||||
rtsp_parse_packet_acceptline(ndpi_struct, flow);
|
||||
@@ -462,28 +438,26 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
}
|
||||
|
||||
/* search for line startin with "Icy-MetaData" */
|
||||
for (a = 0; a < packet->parsed_lines; a++) {
|
||||
for (a = 0; a < packet->parsed_lines; a++) {
|
||||
if(packet->line[a].len > 11 && memcmp(packet->line[a].ptr, "Icy-MetaData", 12) == 0) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found MPEG: Icy-MetaData\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_CONTENT_CATEGORY_MPEG);
|
||||
return;
|
||||
}
|
||||
NDPI_LOG_INFO(ndpi_struct, "found MPEG: Icy-MetaData\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_CONTENT_CATEGORY_MPEG);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(packet->content_line.ptr != NULL && packet->content_line.len != 0) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "Content Type line found %.*s\n",
|
||||
packet->content_line.len, packet->content_line.ptr);
|
||||
packet->content_line.len, packet->content_line.ptr);
|
||||
|
||||
if((ndpi_struct->http_dont_dissect_response) || flow->http_detected) {
|
||||
ndpi_protocol_match_result ret_match;
|
||||
|
||||
|
||||
ndpi_match_content_subprotocol(ndpi_struct, flow,
|
||||
(char*)packet->content_line.ptr, packet->content_line.len,
|
||||
&ret_match, NDPI_PROTOCOL_HTTP);
|
||||
}
|
||||
}
|
||||
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, packet->detected_protocol_stack[0]);
|
||||
}
|
||||
|
||||
static void check_http_payload(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
|
||||
@@ -512,22 +486,22 @@ static void check_http_payload(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
#define STATIC_STRING_L(a) {.str=a, .len=sizeof(a)-1 }
|
||||
|
||||
static struct l_string {
|
||||
const char *str;
|
||||
size_t len;
|
||||
const char *str;
|
||||
size_t len;
|
||||
} http_methods[] = {
|
||||
STATIC_STRING_L("GET "),
|
||||
STATIC_STRING_L("POST "),
|
||||
STATIC_STRING_L("OPTIONS "),
|
||||
STATIC_STRING_L("HEAD "),
|
||||
STATIC_STRING_L("PUT "),
|
||||
STATIC_STRING_L("DELETE "),
|
||||
STATIC_STRING_L("CONNECT "),
|
||||
STATIC_STRING_L("PROPFIND "),
|
||||
STATIC_STRING_L("REPORT ") };
|
||||
STATIC_STRING_L("GET "),
|
||||
STATIC_STRING_L("POST "),
|
||||
STATIC_STRING_L("OPTIONS "),
|
||||
STATIC_STRING_L("HEAD "),
|
||||
STATIC_STRING_L("PUT "),
|
||||
STATIC_STRING_L("DELETE "),
|
||||
STATIC_STRING_L("CONNECT "),
|
||||
STATIC_STRING_L("PROPFIND "),
|
||||
STATIC_STRING_L("REPORT ") };
|
||||
static const char *http_fs = "CDGHOPR";
|
||||
|
||||
static uint8_t non_ctrl(uint8_t c) {
|
||||
return c < 32 ? '.':c;
|
||||
return c < 32 ? '.':c;
|
||||
}
|
||||
|
||||
static u_int16_t http_request_url_offset(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
|
||||
@@ -536,9 +510,9 @@ static u_int16_t http_request_url_offset(struct ndpi_detection_module_struct *nd
|
||||
int i;
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "====>>>> HTTP: %c%c%c%c [len: %u]\n",
|
||||
non_ctrl(packet->payload[0]), non_ctrl(packet->payload[1]),
|
||||
non_ctrl(packet->payload[2]), non_ctrl(packet->payload[3]),
|
||||
packet->payload_packet_len);
|
||||
non_ctrl(packet->payload[0]), non_ctrl(packet->payload[1]),
|
||||
non_ctrl(packet->payload[2]), non_ctrl(packet->payload[3]),
|
||||
packet->payload_packet_len);
|
||||
|
||||
/* Check first char */
|
||||
if(!strchr(http_fs,packet->payload[0])) return 0;
|
||||
@@ -546,11 +520,11 @@ static u_int16_t http_request_url_offset(struct ndpi_detection_module_struct *nd
|
||||
FIRST PAYLOAD PACKET FROM CLIENT
|
||||
**/
|
||||
for(i=0; i < sizeof(http_methods)/sizeof(http_methods[0]); i++) {
|
||||
if(packet->payload_packet_len >= http_methods[i].len &&
|
||||
memcmp(packet->payload,http_methods[i].str,http_methods[i].len) == 0) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "HTTP: %sFOUND\n",http_methods[i].str);
|
||||
return http_methods[i].len;
|
||||
}
|
||||
if(packet->payload_packet_len >= http_methods[i].len &&
|
||||
memcmp(packet->payload,http_methods[i].str,http_methods[i].len) == 0) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "HTTP: %sFOUND\n",http_methods[i].str);
|
||||
return http_methods[i].len;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -582,7 +556,7 @@ static void http_bitmask_exclude_other(struct ndpi_flow_struct *flow)
|
||||
/*************************************************************************************************/
|
||||
|
||||
static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow) {
|
||||
struct ndpi_flow_struct *flow) {
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
u_int16_t filename_start; /* the filename in the request method line, e.g., "GET filename_start..."*/
|
||||
|
||||
@@ -602,20 +576,6 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
|
||||
if(packet->payload_packet_len >= 7 && memcmp(packet->payload, "HTTP/1.", 7) == 0) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found HTTP response\n");
|
||||
|
||||
if(packet->payload_packet_len >= 12) {
|
||||
char buf[4];
|
||||
|
||||
/* Set server HTTP response code */
|
||||
strncpy(buf, (char*)&packet->payload[9], 3);
|
||||
buf[3] = '\0';
|
||||
|
||||
flow->http.response_status_code = atoi(buf);
|
||||
/* https://en.wikipedia.org/wiki/List_of_HTTP_status_codes */
|
||||
if((flow->http.response_status_code < 100) || (flow->http.response_status_code > 509))
|
||||
flow->http.response_status_code = 0; /* Out of range */
|
||||
}
|
||||
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HTTP);
|
||||
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||
return;
|
||||
@@ -626,7 +586,7 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
flow->l4.tcp.http_stage = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if((packet->payload_packet_len == 40) && (flow->l4.tcp.http_stage == 0)) {
|
||||
/*
|
||||
-> QR O06L0072-6L91-4O43-857J-K8OO172L6L51
|
||||
@@ -640,11 +600,11 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
&& (packet->payload[21] == '-')
|
||||
&& (packet->payload[26] == '-')
|
||||
&& (packet->payload[39] == 0x0A)
|
||||
)
|
||||
flow->l4.tcp.http_stage = 1;
|
||||
return;
|
||||
)
|
||||
flow->l4.tcp.http_stage = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if((packet->payload_packet_len == 23) && (memcmp(packet->payload, "<policy-file-request/>", 23) == 0)) {
|
||||
/*
|
||||
<policy-file-request/>
|
||||
@@ -653,35 +613,23 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
<allow-access-from domain="*.speedtest.net" to-ports="8080"/>
|
||||
</cross-domain-policy>
|
||||
*/
|
||||
ookla_found:
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_OOKLA, NDPI_PROTOCOL_UNKNOWN);
|
||||
|
||||
if(ndpi_struct->ookla_cache == NULL)
|
||||
ndpi_struct->ookla_cache = ndpi_lru_cache_init(1024);
|
||||
|
||||
if(packet->iph != NULL && ndpi_struct->ookla_cache != NULL) {
|
||||
if(packet->tcp->source == htons(8080))
|
||||
ndpi_lru_add_to_cache(ndpi_struct->ookla_cache, packet->iph->saddr);
|
||||
else
|
||||
ndpi_lru_add_to_cache(ndpi_struct->ookla_cache, packet->iph->daddr);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
http_bitmask_exclude_other(flow);
|
||||
return;
|
||||
}
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct,
|
||||
"Filename HTTP found: %d, we look for line info..\n", filename_start);
|
||||
"Filename HTTP found: %d, we look for line info..\n", filename_start);
|
||||
|
||||
ndpi_parse_packet_line_info(ndpi_struct, flow);
|
||||
|
||||
if(packet->parsed_lines <= 1) {
|
||||
NDPI_LOG_DBG2(ndpi_struct,
|
||||
"Found just one line, we will look further for the next packet...\n");
|
||||
"Found just one line, we will look further for the next packet...\n");
|
||||
|
||||
packet->http_method.ptr = packet->line[0].ptr;
|
||||
packet->http_method.len = filename_start - 1;
|
||||
@@ -692,10 +640,10 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
}
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct,
|
||||
"Found more than one line, we look further for the next packet...\n");
|
||||
"Found more than one line, we look further for the next packet...\n");
|
||||
|
||||
if(packet->line[0].len >= (9 + filename_start)
|
||||
&& memcmp(&packet->line[0].ptr[packet->line[0].len - 9], " HTTP/1.", 8) == 0) { /* Request line complete. Ex. "GET / HTTP/1.1" */
|
||||
&& memcmp(&packet->line[0].ptr[packet->line[0].len - 9], " HTTP/1.", 8) == 0) { /* Request line complete. Ex. "GET / HTTP/1.1" */
|
||||
|
||||
packet->http_url_name.ptr = &packet->payload[filename_start];
|
||||
packet->http_url_name.len = packet->line[0].len - (filename_start + 9);
|
||||
@@ -705,38 +653,40 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
|
||||
// Set the HTTP requested version: 0=HTTP/1.0 and 1=HTTP/1.1
|
||||
if(memcmp(&packet->line[0].ptr[packet->line[0].len - 1], "1", 1) == 0)
|
||||
flow->http.request_version = 1;
|
||||
flow->http.request_version = 1;
|
||||
else
|
||||
flow->http.request_version = 0;
|
||||
flow->http.request_version = 0;
|
||||
|
||||
/* Set the first found headers in request */
|
||||
flow->http.num_request_headers = packet->http_num_headers;
|
||||
|
||||
|
||||
/* Check for Ookla */
|
||||
if((packet->referer_line.len > 0)
|
||||
&& ndpi_strnstr((const char *)packet->referer_line.ptr, "www.speedtest.net", packet->referer_line.len)) {
|
||||
goto ookla_found;
|
||||
&& ndpi_strnstr((const char *)packet->referer_line.ptr, "www.speedtest.net", packet->referer_line.len)) {
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_OOKLA, NDPI_PROTOCOL_HTTP);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check for additional field introduced by Steam */
|
||||
int x = 1;
|
||||
if(packet->line[x].len >= 11 && (memcmp(packet->line[x].ptr, "x-steam-sid", 11)) == 0) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found STEAM\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_STEAM);
|
||||
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||
return;
|
||||
NDPI_LOG_INFO(ndpi_struct, "found STEAM\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_STEAM);
|
||||
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check for additional field introduced by Facebook */
|
||||
x = 1;
|
||||
while(packet->line[x].len != 0) {
|
||||
if(packet->line[x].len >= 12 && (memcmp(packet->line[x].ptr, "X-FB-SIM-HNI", 12)) == 0) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found FACEBOOK\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FACEBOOK);
|
||||
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
x++;
|
||||
if(packet->line[x].len >= 12 && (memcmp(packet->line[x].ptr, "X-FB-SIM-HNI", 12)) == 0) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found FACEBOOK\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_FACEBOOK);
|
||||
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
x++;
|
||||
}
|
||||
|
||||
#if defined(NDPI_PROTOCOL_1KXUN) || defined(NDPI_PROTOCOL_IQIYI)
|
||||
@@ -781,23 +731,23 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if((packet->http_url_name.len > 7)
|
||||
&& (!strncmp((const char*) packet->http_url_name.ptr, "http://", 7))) {
|
||||
&& (!strncmp((const char*) packet->http_url_name.ptr, "http://", 7))) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found HTTP_PROXY\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HTTP_PROXY);
|
||||
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||
}
|
||||
|
||||
if(filename_start == 8 && (memcmp(packet->payload, "CONNECT ", 8) == 0)) {
|
||||
/* nathan@getoffmalawn.com */
|
||||
/* nathan@getoffmalawn.com */
|
||||
NDPI_LOG_INFO(ndpi_struct, "found HTTP_CONNECT\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HTTP_CONNECT);
|
||||
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||
}
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct,
|
||||
"HTTP START Found, we will look for sub-protocols (content and host)...\n");
|
||||
"HTTP START Found, we will look for sub-protocols (content and host)...\n");
|
||||
|
||||
if(packet->host_line.ptr != NULL) {
|
||||
/**
|
||||
@@ -810,11 +760,11 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
if(ndpi_struct->http_dont_dissect_response) {
|
||||
if(flow->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN) /* No subprotocol found */
|
||||
NDPI_LOG_INFO(ndpi_struct, "found HTTP\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HTTP);
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HTTP);
|
||||
} else {
|
||||
flow->http_detected = 1;
|
||||
NDPI_LOG_DBG2(ndpi_struct,
|
||||
"HTTP START Found, we will look further for the response...\n");
|
||||
"HTTP START Found, we will look further for the response...\n");
|
||||
flow->l4.tcp.http_stage = packet->packet_direction + 1; // packet_direction 0: stage 1, packet_direction 1: stage 2
|
||||
}
|
||||
|
||||
@@ -825,21 +775,25 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
http_bitmask_exclude_other(flow);
|
||||
} else if((flow->l4.tcp.http_stage == 1) || (flow->l4.tcp.http_stage == 2)) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "HTTP stage %u: \n", flow->l4.tcp.http_stage);
|
||||
|
||||
} else if((flow->l4.tcp.http_stage == 1) || (flow->l4.tcp.http_stage == 2)) {
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "HTTP stage %u: \n", flow->l4.tcp.http_stage);
|
||||
|
||||
if((packet->payload_packet_len == 34) && (flow->l4.tcp.http_stage == 1)) {
|
||||
if((packet->payload[5] == ' ') && (packet->payload[9] == ' ')) {
|
||||
goto ookla_found;
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_OOKLA);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if((packet->payload_packet_len > 6) && memcmp(packet->payload, "HELLO ", 6) == 0) {
|
||||
/* This looks like Ookla */
|
||||
goto ookla_found;
|
||||
/* This looks like Ookla */
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_OOKLA, NDPI_PROTOCOL_UNKNOWN);
|
||||
return;
|
||||
} else
|
||||
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_OOKLA);
|
||||
|
||||
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_OOKLA);
|
||||
|
||||
/**
|
||||
At first check, if this is for sure a response packet (in another direction. If not, if HTTP is detected do nothing now and return,
|
||||
otherwise check the second packet for the HTTP request
|
||||
@@ -850,7 +804,7 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
return;
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct,
|
||||
" SECOND PAYLOAD TRAFFIC FROM CLIENT, FIRST PACKET MIGHT HAVE BEEN HTTP...UNKNOWN TRAFFIC, HERE FOR HTTP again.. \n");
|
||||
" SECOND PAYLOAD TRAFFIC FROM CLIENT, FIRST PACKET MIGHT HAVE BEEN HTTP...UNKNOWN TRAFFIC, HERE FOR HTTP again.. \n");
|
||||
|
||||
ndpi_parse_packet_line_info(ndpi_struct, flow);
|
||||
|
||||
@@ -872,14 +826,14 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
}
|
||||
// http://www.slideshare.net/DSPIP/rtsp-analysis-wireshark
|
||||
if(packet->line[0].len >= 9
|
||||
&& memcmp(&packet->line[0].ptr[packet->line[0].len - 9], " HTTP/1.", 8) == 0) {
|
||||
&& memcmp(&packet->line[0].ptr[packet->line[0].len - 9], " HTTP/1.", 8) == 0) {
|
||||
|
||||
NDPI_LOG_INFO(ndpi_struct, "found HTTP\n");
|
||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_HTTP);
|
||||
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct,
|
||||
"HTTP START Found in 2. packet, we will look further for the response....\n");
|
||||
"HTTP START Found in 2. packet, we will look further for the response....\n");
|
||||
flow->http_detected = 1;
|
||||
}
|
||||
|
||||
@@ -912,8 +866,9 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
ndpi_parse_packet_line_info(ndpi_struct, flow);
|
||||
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||
|
||||
if(packet->packet_direction == 1 /* server -> client */)
|
||||
flow->http.num_response_headers += packet->http_num_headers; /* flow structs are initialized with zeros */
|
||||
if(packet->packet_direction == 1 /* server -> client */){
|
||||
flow->http.num_response_headers += packet->http_num_headers; /* flow structs are initialized with zeros */
|
||||
}
|
||||
|
||||
if(packet->empty_line_position_set != 0 || flow->l4.tcp.http_empty_line_seen == 1) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "empty line. check_http_payload\n");
|
||||
@@ -937,8 +892,8 @@ void ndpi_search_http_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
}
|
||||
|
||||
if(packet->detected_protocol_stack[0] != NDPI_PROTOCOL_UNKNOWN) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
NDPI_LOG_DBG(ndpi_struct, "search HTTP\n");
|
||||
ndpi_check_http_tcp(ndpi_struct, flow);
|
||||
@@ -967,7 +922,7 @@ char* ndpi_get_http_url(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
/* ********************************* */
|
||||
|
||||
char* ndpi_get_http_content_type(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
struct ndpi_flow_struct *flow) {
|
||||
struct ndpi_flow_struct *flow) {
|
||||
if((!flow) || (!flow->http.content_type))
|
||||
return("");
|
||||
else
|
||||
|
||||
@@ -1,30 +1,10 @@
|
||||
/*
|
||||
* list.c
|
||||
*
|
||||
* Copyright (C) 2017-18 - ntop.org
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_LISP
|
||||
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define LISP_PORT 4341
|
||||
#define LISP_PORT 4341
|
||||
#define LISP_PORT1 4342
|
||||
|
||||
static void ndpi_int_lisp_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
@@ -63,19 +63,21 @@ static int ndpi_int_check_mdns_payload(struct ndpi_detection_module_struct
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
struct mdns_header *h = (struct mdns_header*)packet->payload;
|
||||
u_int16_t questions = ntohs(h->questions), answers = ntohs(h->answers);
|
||||
|
||||
if((questions > NDPI_MAX_MDNS_REQUESTS)
|
||||
|| (answers > NDPI_MAX_MDNS_REQUESTS))
|
||||
return(0);
|
||||
|
||||
if((packet->payload[2] & 0x80) == 0) {
|
||||
if(((packet->payload[2] & 0x80) == 0)
|
||||
&& (questions <= NDPI_MAX_MDNS_REQUESTS)
|
||||
&& (answers <= NDPI_MAX_MDNS_REQUESTS)) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found MDNS with question query\n");
|
||||
return 1;
|
||||
} else if((packet->payload[2] & 0x80) != 0) {
|
||||
}
|
||||
else if(((packet->payload[2] & 0x80) != 0)
|
||||
&& (questions == 0)
|
||||
&& (answers <= NDPI_MAX_MDNS_REQUESTS)
|
||||
&& (answers != 0)) {
|
||||
char answer[256];
|
||||
int i, j, len;
|
||||
|
||||
for(i=13, j=0; (i < packet->payload_packet_len) && (i < (sizeof(answer)-1)) && (packet->payload[i] != 0); i++)
|
||||
for(i=13, j=0; (packet->payload[i] != 0) && (i < packet->payload_packet_len) && (i < (sizeof(answer)-1)); i++)
|
||||
answer[j++] = (packet->payload[i] < 13) ? '.' : packet->payload[i];
|
||||
|
||||
answer[j] = '\0';
|
||||
@@ -98,6 +100,8 @@ static int ndpi_int_check_mdns_payload(struct ndpi_detection_module_struct
|
||||
void ndpi_search_mdns(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
|
||||
{
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
u_int16_t dport;
|
||||
|
||||
NDPI_LOG_DBG(ndpi_struct, "search MDNS\n");
|
||||
|
||||
/**
|
||||
@@ -107,13 +111,15 @@ void ndpi_search_mdns(struct ndpi_detection_module_struct *ndpi_struct, struct n
|
||||
/* check if UDP packet */
|
||||
if(packet->udp != NULL) {
|
||||
/* read destination port */
|
||||
u_int16_t sport = ntohs(packet->udp->source);
|
||||
u_int16_t dport = ntohs(packet->udp->dest);
|
||||
dport = ntohs(packet->udp->dest);
|
||||
|
||||
/* check standard MDNS ON port 5353 */
|
||||
if(((dport == 5353) || (sport == 5353))
|
||||
&& (packet->payload_packet_len >= 12)) {
|
||||
if(packet->iph != NULL) {
|
||||
if(dport == 5353 && packet->payload_packet_len >= 12) {
|
||||
/* mdns protocol must have destination address 224.0.0.251 */
|
||||
if(packet->iph != NULL /* && ntohl(packet->iph->daddr) == 0xe00000fb */) {
|
||||
|
||||
NDPI_LOG_INFO(ndpi_struct, "found MDNS with destination address 224.0.0.251 (=0xe00000fb)\n");
|
||||
|
||||
if(ndpi_int_check_mdns_payload(ndpi_struct, flow) == 1) {
|
||||
ndpi_int_mdns_add_connection(ndpi_struct, flow);
|
||||
return;
|
||||
@@ -135,7 +141,6 @@ void ndpi_search_mdns(struct ndpi_detection_module_struct *ndpi_struct, struct n
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
}
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* mining.c [Bitcoin, Ethereum, ZCash, Monero]
|
||||
*
|
||||
* Copyright (C) 2018 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
#include "ndpi_api.h"
|
||||
|
||||
void ndpi_search_mining_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow) {
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
|
||||
NDPI_LOG_DBG(ndpi_struct, "search MINING\n");
|
||||
|
||||
/* Check connection over TCP */
|
||||
if(packet->tcp && (packet->payload_packet_len > 10)) {
|
||||
|
||||
if(packet->tcp->source == htons(8333)) {
|
||||
/*
|
||||
Bitcoin
|
||||
|
||||
bitcoin.magic == 0xf9beb4d9 || bitcoin.magic == 0xfabfb5da
|
||||
*/
|
||||
u_int32_t magic = htonl(0xf9beb4d9), magic1 = htonl(0xfabfb5da), *to_match = (u_int32_t*)packet->payload;
|
||||
|
||||
if((*to_match == magic) || (*to_match == magic1)) {
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN);
|
||||
}
|
||||
} if(ndpi_strnstr((const char *)packet->payload, "{", packet->payload_packet_len)
|
||||
&& (
|
||||
ndpi_strnstr((const char *)packet->payload, "\"eth1.0\"", packet->payload_packet_len)
|
||||
|| ndpi_strnstr((const char *)packet->payload, "\"worker\":", packet->payload_packet_len)
|
||||
/* || ndpi_strnstr((const char *)packet->payload, "\"id\":", packet->payload_packet_len) - Removed as too generic */
|
||||
)) {
|
||||
/*
|
||||
Ethereum
|
||||
|
||||
{"worker": "eth1.0", "jsonrpc": "2.0", "params": ["0x0fccfff9e61a230ff380530c6827caf4759337c6.rig2", "x"], "id": 2, "method": "eth_submitLogin"}
|
||||
{ "id": 2, "jsonrpc":"2.0","result":true}
|
||||
{"worker": "", "jsonrpc": "2.0", "params": [], "id": 3, "method": "eth_getWork"}
|
||||
*/
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN);
|
||||
} else if(ndpi_strnstr((const char *)packet->payload, "{", packet->payload_packet_len)
|
||||
&& (ndpi_strnstr((const char *)packet->payload, "\"method\":", packet->payload_packet_len)
|
||||
|| ndpi_strnstr((const char *)packet->payload, "\"blob\":", packet->payload_packet_len)
|
||||
/* || ndpi_strnstr((const char *)packet->payload, "\"id\":", packet->payload_packet_len) - Removed as too generic */
|
||||
)
|
||||
) {
|
||||
/*
|
||||
ZCash
|
||||
|
||||
{"method":"login","params":{"login":"4BCeEPhodgPMbPWFN1dPwhWXdRX8q4mhhdZdA1dtSMLTLCEYvAj9QXjXAfF7CugEbmfBhgkqHbdgK9b2wKA6nqRZQCgvCDm.cb2b73415c4faf214035a73b9d947c202342f3bf3bdf632132bd6d7af98cb257.ryzen","pass":"x","agent":"xmr-stak-cpu/1.3.0-1.5.0"},"id":1}
|
||||
{"id":1,"jsonrpc":"2.0","error":null,"result":{"id":"479059546883218","job":{"blob":"0606e89883d205a65d8ee78991838a1cf3ec2ebbc5fb1fa43dec5fa1cd2bee4069212a549cd731000000005a88235653097aa3e97ef2ceef4aee610751a828f9be1a0758a78365fb0a4c8c05","job_id":"722134174127131","target":"dc460300"},"status":"OK"}}
|
||||
{"method":"submit","params":{"id":"479059546883218","job_id":"722134174127131","nonce":"98024001","result":"c9be9381a68d533c059d614d961e0534d7d8785dd5c339c2f9596eb95f320100"},"id":1}
|
||||
|
||||
Monero
|
||||
|
||||
{"method":"login","params":{"login":"4BCeEPhodgPMbPWFN1dPwhWXdRX8q4mhhdZdA1dtSMLTLCEYvAj9QXjXAfF7CugEbmfBhgkqHbdgK9b2wKA6nqRZQCgvCDm.cb2b73415c4faf214035a73b9d947c202342f3bf3bdf632132bd6d7af98cb257.ryzen","pass":"x","agent":"xmr-stak-cpu/1.3.0-1.5.0"},"id":1}
|
||||
{"id":1,"jsonrpc":"2.0","error":null,"result":{"id":"479059546883218","job":{"blob":"0606e89883d205a65d8ee78991838a1cf3ec2ebbc5fb1fa43dec5fa1cd2bee4069212a549cd731000000005a88235653097aa3e97ef2ceef4aee610751a828f9be1a0758a78365fb0a4c8c05","job_id":"722134174127131","target":"dc460300"},"status":"OK"}}
|
||||
{"method":"submit","params":{"id":"479059546883218","job_id":"722134174127131","nonce":"98024001","result":"c9be9381a68d533c059d614d961e0534d7d8785dd5c339c2f9596eb95f320100"},"id":1}
|
||||
*/
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN);
|
||||
}
|
||||
}
|
||||
|
||||
ndpi_exclude_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, __FILE__, __FUNCTION__, __LINE__);
|
||||
}
|
||||
|
||||
|
||||
void init_mining_dissector(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask)
|
||||
{
|
||||
ndpi_set_bitmask_protocol_detection("Mining", ndpi_struct, detection_bitmask, *id,
|
||||
NDPI_PROTOCOL_MINING,
|
||||
ndpi_search_mining_tcp,
|
||||
NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
|
||||
SAVE_DETECTION_BITMASK_AS_UNKNOWN,
|
||||
ADD_TO_DETECTION_BITMASK);
|
||||
|
||||
*id += 1;
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
|
||||
/*
|
||||
* modbus.c
|
||||
*
|
||||
* Copyright (C) 2018 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "ndpi_protocol_ids.h"
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MODBUS
|
||||
|
||||
void ndpi_search_modbus_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow) {
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
NDPI_LOG_DBG(ndpi_struct, "search Modbus\n");
|
||||
u_int16_t modbus_port = htons(502); // port used by modbus
|
||||
|
||||
/* Check connection over TCP */
|
||||
|
||||
if(packet->tcp) {
|
||||
/* The payload of Modbus-TCP segment must be at least 8 bytes (7 bytes of header application
|
||||
packet plus 1 byte of minimum payload of application packet)
|
||||
*/
|
||||
if((packet->payload_packet_len >= 8)
|
||||
&&((packet->tcp->dest == modbus_port) || (packet->tcp->source == modbus_port))) {
|
||||
// Modbus uses the port 502
|
||||
u_int16_t modbus_len = htons(*((u_int16_t*)&packet->payload[4]));
|
||||
|
||||
// the fourth parameter of the payload is the length of the segment
|
||||
if((modbus_len-1) == (packet->payload_packet_len - 7 /* ModbusTCP header len */)) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found MODBUS\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MODBUS, NDPI_PROTOCOL_UNKNOWN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void init_modbus_dissector(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask) {
|
||||
|
||||
ndpi_set_bitmask_protocol_detection("Modbus", ndpi_struct, detection_bitmask, *id,
|
||||
NDPI_PROTOCOL_MODBUS,
|
||||
ndpi_search_modbus_tcp,
|
||||
NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
|
||||
SAVE_DETECTION_BITMASK_AS_UNKNOWN,
|
||||
ADD_TO_DETECTION_BITMASK);
|
||||
*id += 1;
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* nest_log_sink.c
|
||||
*
|
||||
* Copyright (C) 2009-2011 by ipoque GmbH
|
||||
* Copyright (C) 2011-18 - ntop.org
|
||||
* Copyright (C) 2018 - eGloo Incorporated
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_NEST_LOG_SINK
|
||||
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define NEST_LOG_SINK_PORT 11095
|
||||
#define NEST_LOG_SINK_MIN_LEN 8
|
||||
#define NEST_LOG_SINK_MIN_MATCH 3
|
||||
|
||||
void ndpi_search_nest_log_sink(
|
||||
struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow)
|
||||
{
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
|
||||
NDPI_LOG_DBG(ndpi_struct, "search nest_log_sink\n");
|
||||
|
||||
if (packet->payload_packet_len < NEST_LOG_SINK_MIN_LEN) {
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ntohs(packet->tcp->source) != NEST_LOG_SINK_PORT &&
|
||||
ntohs(packet->tcp->dest) != NEST_LOG_SINK_PORT) {
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
|
||||
if (packet->payload[1] <= 0x02 &&
|
||||
(packet->payload[2] == 0x00 || packet->payload[2] == 0x10) &&
|
||||
packet->payload[3] == 0x13)
|
||||
flow->l4.tcp.nest_log_sink_matches++;
|
||||
|
||||
if (flow->l4.tcp.nest_log_sink_matches == NEST_LOG_SINK_MIN_MATCH) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found nest_log_sink\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_NEST_LOG_SINK, NDPI_PROTOCOL_UNKNOWN);
|
||||
}
|
||||
}
|
||||
|
||||
void init_nest_log_sink_dissector(
|
||||
struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask)
|
||||
{
|
||||
ndpi_set_bitmask_protocol_detection("NEST_LOG_SINK",
|
||||
ndpi_struct, detection_bitmask, *id,
|
||||
NDPI_PROTOCOL_NEST_LOG_SINK,
|
||||
ndpi_search_nest_log_sink,
|
||||
NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD,
|
||||
SAVE_DETECTION_BITMASK_AS_UNKNOWN,
|
||||
ADD_TO_DETECTION_BITMASK);
|
||||
|
||||
*id += 1;
|
||||
}
|
||||
@@ -330,8 +330,9 @@ void ndpi_search_netbios(struct ndpi_detection_module_struct *ndpi_struct, struc
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "found netbios port 138 and payload length >= 112 \n");
|
||||
|
||||
if(packet->payload[0] >= 0x10 && packet->payload[0] <= 0x16) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "found netbios with MSG-type 0x10,0x11,0x12,0x13,0x14,0x15 or 0x16\n");
|
||||
if(packet->payload[0] >= 0x11 && packet->payload[0] <= 0x16) {
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "found netbios with MSG-type 0x11,0x12,0x13,0x14,0x15 or 0x16\n");
|
||||
|
||||
if(ntohl(get_u_int32_t(packet->payload, 4)) == ntohl(packet->iph->saddr)) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found netbios with checked ip-address\n");
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* ookla.c
|
||||
*
|
||||
* Copyright (C) 2018 - ntop.org
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_OOKLA
|
||||
|
||||
#include "ndpi_api.h"
|
||||
|
||||
|
||||
void ndpi_search_ookla(struct ndpi_detection_module_struct* ndpi_struct, struct ndpi_flow_struct* flow) {
|
||||
struct ndpi_packet_struct* packet = &flow->packet;
|
||||
u_int32_t addr = 0;
|
||||
void *value;
|
||||
|
||||
NDPI_LOG_DBG(ndpi_struct, "Ookla detection\n");
|
||||
|
||||
if(packet->tcp->source == htons(8080))
|
||||
addr = packet->iph->saddr;
|
||||
else if(packet->tcp->dest == htons(8080))
|
||||
addr = packet->iph->daddr;
|
||||
else
|
||||
goto ookla_exclude;
|
||||
|
||||
if(ndpi_struct->ookla_cache != NULL) {
|
||||
if(ndpi_lru_find_cache(ndpi_struct->ookla_cache, addr, 0 /* Don't remove it as it can be used for other connections */)) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found ookla tcp connection\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_OOKLA, NDPI_PROTOCOL_UNKNOWN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ookla_exclude:
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
}
|
||||
|
||||
void init_ookla_dissector(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask) {
|
||||
ndpi_set_bitmask_protocol_detection("Ookla", ndpi_struct, detection_bitmask, *id,
|
||||
NDPI_PROTOCOL_OOKLA,
|
||||
ndpi_search_ookla,
|
||||
NDPI_SELECTION_BITMASK_PROTOCOL_TCP,
|
||||
SAVE_DETECTION_BITMASK_AS_UNKNOWN,
|
||||
ADD_TO_DETECTION_BITMASK);
|
||||
|
||||
*id += 1;
|
||||
}
|
||||
@@ -96,8 +96,8 @@ void ndpi_search_quic(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
&& (packet->payload[i+1] == 'N')
|
||||
&& (packet->payload[i+2] == 'I')
|
||||
&& (packet->payload[i+3] == 0)) {
|
||||
u_int32_t offset = le32toh(*((u_int32_t*)&packet->payload[i+4]));
|
||||
u_int32_t prev_offset = le32toh(*((u_int32_t*)&packet->payload[i-4]));
|
||||
u_int32_t offset = *((u_int32_t*)&packet->payload[i+4]);
|
||||
u_int32_t prev_offset = *((u_int32_t*)&packet->payload[i-4]);
|
||||
int len = offset-prev_offset;
|
||||
int sni_offset = i+prev_offset+1;
|
||||
|
||||
|
||||
@@ -39,13 +39,10 @@ static void ndpi_check_radius(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
if(packet->udp != NULL) {
|
||||
struct radius_header *h = (struct radius_header*)packet->payload;
|
||||
/* RFC2865: The minimum length is 20 and maximum length is 4096. */
|
||||
if((payload_len < 20) || (payload_len > 4096))
|
||||
return;
|
||||
|
||||
if((payload_len > sizeof(struct radius_header))
|
||||
&& (h->code > 0)
|
||||
&& (h->code <= 13)
|
||||
&& (h->code <= 5)
|
||||
&& (ntohs(h->len) == payload_len)) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "Found radius\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_RADIUS, NDPI_PROTOCOL_UNKNOWN);
|
||||
|
||||
+11
-27
@@ -23,22 +23,14 @@
|
||||
|
||||
#include "ndpi_api.h"
|
||||
|
||||
static void ndpi_skype_report_protocol(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
|
||||
//printf("-> payload_len=%u\n", flow->packet.payload_packet_len);
|
||||
|
||||
NDPI_LOG_INFO(ndpi_struct, "found skype\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SKYPE_CALL, NDPI_PROTOCOL_SKYPE);
|
||||
}
|
||||
|
||||
static int is_port(u_int16_t a, u_int16_t b, u_int16_t c) {
|
||||
return(((a == c) || (b == c)) ? 1 : 0);
|
||||
}
|
||||
|
||||
static void ndpi_check_skype(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
|
||||
static void ndpi_check_skype(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
|
||||
{
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
// const u_int8_t *packet_payload = packet->payload;
|
||||
u_int32_t payload_len = packet->payload_packet_len;
|
||||
|
||||
|
||||
if(flow->host_server_name[0] != '\0')
|
||||
return;
|
||||
|
||||
@@ -47,33 +39,25 @@ static void ndpi_check_skype(struct ndpi_detection_module_struct *ndpi_struct, s
|
||||
flow->l4.udp.skype_packet_id++;
|
||||
|
||||
if(flow->l4.udp.skype_packet_id < 5) {
|
||||
u_int16_t sport = ntohs(packet->udp->source);
|
||||
u_int16_t dport = ntohs(packet->udp->dest);
|
||||
|
||||
/* skype-to-skype */
|
||||
if(is_port(sport, dport, 1119) /* It can be confused with battle.net */
|
||||
|| is_port(sport, dport, 80) /* No HTTP-like protocols UDP/80 */
|
||||
) {
|
||||
;
|
||||
} else {
|
||||
if(dport != 1119) /* It can be confused with battle.net */ {
|
||||
if(((payload_len == 3) && ((packet->payload[2] & 0x0F)== 0x0d)) ||
|
||||
((payload_len >= 16)
|
||||
&& (packet->payload[0] != 0x30) /* Avoid invalid SNMP detection */
|
||||
&& (packet->payload[2] == 0x02))) {
|
||||
ndpi_skype_report_protocol(ndpi_struct, flow);
|
||||
NDPI_LOG_INFO(ndpi_struct, "found skype\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SKYPE, NDPI_PROTOCOL_UNKNOWN);
|
||||
}
|
||||
}
|
||||
|
||||
// return;
|
||||
return;
|
||||
}
|
||||
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
return;
|
||||
|
||||
// TCP check
|
||||
} else if((packet->tcp != NULL)
|
||||
/* As the TCP skype heuristic is weak, we need to make sure no other protocols overlap */
|
||||
&& (flow->guessed_host_protocol_id == NDPI_PROTOCOL_UNKNOWN)
|
||||
&& (flow->guessed_protocol_id == NDPI_PROTOCOL_UNKNOWN)) {
|
||||
} else if(packet->tcp != NULL) {
|
||||
flow->l4.tcp.skype_packet_id++;
|
||||
|
||||
if(flow->l4.tcp.skype_packet_id < 3) {
|
||||
@@ -87,9 +71,9 @@ static void ndpi_check_skype(struct ndpi_detection_module_struct *ndpi_struct, s
|
||||
if((payload_len == 8) || (payload_len == 3) || (payload_len == 17)) {
|
||||
// printf("[SKYPE] payload_len=%u\n", payload_len);
|
||||
/* printf("[SKYPE] %u/%u\n", ntohs(packet->tcp->source), ntohs(packet->tcp->dest)); */
|
||||
|
||||
|
||||
NDPI_LOG_INFO(ndpi_struct, "found skype\n");
|
||||
ndpi_skype_report_protocol(ndpi_struct, flow);
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SKYPE, NDPI_PROTOCOL_UNKNOWN);
|
||||
} else {
|
||||
// printf("NO [SKYPE] payload_len=%u\n", payload_len);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
*/
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_SMB
|
||||
|
||||
#include "ndpi_api.h"
|
||||
|
||||
|
||||
@@ -41,23 +43,19 @@ void ndpi_search_smb_tcp(struct ndpi_detection_module_struct *ndpi_struct, struc
|
||||
|
||||
NDPI_LOG_INFO(ndpi_struct, "found SMB\n");
|
||||
|
||||
if(packet->payload[8] == 0x72)
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SMBV1, NDPI_PROTOCOL_UNKNOWN);
|
||||
else
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SMBV23, NDPI_PROTOCOL_UNKNOWN);
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SMB, NDPI_PROTOCOL_UNKNOWN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ndpi_exclude_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SMBV1, __FILE__, __FUNCTION__, __LINE__);
|
||||
ndpi_exclude_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SMBV23, __FILE__, __FUNCTION__, __LINE__);
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
}
|
||||
|
||||
|
||||
void init_smb_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask)
|
||||
{
|
||||
ndpi_set_bitmask_protocol_detection("SMB", ndpi_struct, detection_bitmask, *id,
|
||||
NDPI_PROTOCOL_SMBV23,
|
||||
NDPI_PROTOCOL_SMB,
|
||||
ndpi_search_smb_tcp,
|
||||
NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
|
||||
SAVE_DETECTION_BITMASK_AS_UNKNOWN,
|
||||
|
||||
@@ -123,6 +123,7 @@ void ndpi_search_snmp(struct ndpi_detection_module_struct *ndpi_struct, struct n
|
||||
}
|
||||
excl:
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+10
-18
@@ -88,25 +88,17 @@ static void ndpi_check_spotify(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
*/
|
||||
|
||||
//printf("%08X - %08X\n", ntohl(packet->iph->saddr), ntohl(packet->iph->daddr));
|
||||
|
||||
long src_addr = ntohl(packet->iph->saddr);
|
||||
long dst_addr = ntohl(packet->iph->daddr);
|
||||
long src_addr_masked_22 = src_addr & 0xFFFFFC00; // */22
|
||||
long dst_addr_masked_22 = dst_addr & 0xFFFFFC00; // */22
|
||||
long src_addr_masked_24 = src_addr & 0xFFFFFF00; // */24
|
||||
long dst_addr_masked_24 = dst_addr & 0xFFFFFF00; // */24
|
||||
|
||||
if( src_addr_masked_22 == 0x4E1F0800 /* 78.31.8.0 */
|
||||
|| dst_addr_masked_22 == 0x4E1F0800 /* 78.31.8.0 */
|
||||
if(((ntohl(packet->iph->saddr) & 0xFFFFFC00 /* 255.255.252.0 */) == 0x4E1F0800 /* 78.31.8.0 */)
|
||||
|| ((ntohl(packet->iph->daddr) & 0xFFFFFC00 /* 255.255.252.0 */) == 0x4E1F0800 /* 78.31.8.0 */)
|
||||
/* **** */
|
||||
|| src_addr_masked_22 == 0xC1EBE800 /* 193.235.232.0 */
|
||||
|| dst_addr_masked_22 == 0xC1EBE800 /* 193.235.232.0 */
|
||||
/* **** */
|
||||
|| src_addr_masked_22 == 0xC284C400 /* 194.132.196.0 */
|
||||
|| dst_addr_masked_22 == 0xC284C400 /* 194.132.196.0 */
|
||||
/* **** */
|
||||
|| src_addr_masked_24 == 0xC284A200 /* 194.132.162.0 */
|
||||
|| dst_addr_masked_24 == 0xC284A200 /* 194.132.162.0 */
|
||||
|| ((ntohl(packet->iph->saddr) & 0xFFFFFC00 /* 255.255.252.0 */) == 0xC1EBE800 /* 193.235.232.0 */)
|
||||
|| ((ntohl(packet->iph->daddr) & 0xFFFFFC00 /* 255.255.252.0 */) == 0xC1EBE800 /* 193.235.232.0 */)
|
||||
/* **** */
|
||||
|| ((ntohl(packet->iph->saddr) & 0xFFFFFC00 /* 255.255.252.0 */) == 0xC284C400 /* 194.132.196.0 */)
|
||||
|| ((ntohl(packet->iph->daddr) & 0xFFFFFC00 /* 255.255.252.0 */) == 0xC284C400 /* 194.132.196.0 */)
|
||||
/* **** */
|
||||
|| ((ntohl(packet->iph->saddr) & 0xFFFFFC00 /* 255.255.252.0 */) == 0xC284A200 /* 194.132.162.0 */)
|
||||
|| ((ntohl(packet->iph->daddr) & 0xFFFFFC00 /* 255.255.252.0 */) == 0xC284A200 /* 194.132.162.0 */)
|
||||
) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found spotify via ip range\n");
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SPOTIFY, NDPI_PROTOCOL_UNKNOWN);
|
||||
|
||||
+27
-62
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "ndpi_api.h"
|
||||
|
||||
// #define CERTIFICATE_DEBUG 1
|
||||
/* #define CERTIFICATE_DEBUG 1 */
|
||||
#define NDPI_MAX_SSL_REQUEST_SIZE 10000
|
||||
|
||||
/* Skype.c */
|
||||
@@ -39,8 +39,8 @@ static u_int32_t ndpi_ssl_refine_master_protocol(struct ndpi_detection_module_st
|
||||
{
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
|
||||
if(((flow->l4.tcp.ssl_seen_client_cert == 1) && (flow->protos.stun_ssl.ssl.client_certificate[0] != '\0'))
|
||||
|| ((flow->l4.tcp.ssl_seen_server_cert == 1) && (flow->protos.stun_ssl.ssl.server_certificate[0] != '\0'))
|
||||
if((flow->protos.stun_ssl.ssl.client_certificate[0] != '\0')
|
||||
|| (flow->protos.stun_ssl.ssl.server_certificate[0] != '\0')
|
||||
|| (flow->host_server_name[0] != '\0'))
|
||||
protocol = NDPI_PROTOCOL_SSL;
|
||||
else
|
||||
@@ -246,56 +246,32 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int16_t compression_len;
|
||||
u_int16_t extensions_len;
|
||||
|
||||
offset++;
|
||||
compression_len = packet->payload[offset];
|
||||
offset++;
|
||||
|
||||
#ifdef CERTIFICATE_DEBUG
|
||||
printf("SSL [compression_len: %u]\n", compression_len);
|
||||
#endif
|
||||
|
||||
// offset += compression_len + 3;
|
||||
offset += compression_len;
|
||||
compression_len = packet->payload[offset+1];
|
||||
offset += compression_len + 3;
|
||||
|
||||
if(offset < total_len) {
|
||||
extensions_len = ntohs(*((u_int16_t*)&packet->payload[offset]));
|
||||
offset += 2;
|
||||
extensions_len = packet->payload[offset];
|
||||
|
||||
#ifdef CERTIFICATE_DEBUG
|
||||
printf("SSL [extensions_len: %u]\n", extensions_len);
|
||||
#endif
|
||||
|
||||
if((extensions_len+offset) <= total_len) {
|
||||
if((extensions_len+offset) < total_len) {
|
||||
/* Move to the first extension
|
||||
Type is u_int to avoid possible overflow on extension_len addition */
|
||||
u_int extension_offset = 0;
|
||||
u_int extension_offset = 1;
|
||||
|
||||
while(extension_offset < extensions_len) {
|
||||
u_int16_t extension_id, extension_len;
|
||||
|
||||
extension_id = ntohs(*((u_int16_t*)&packet->payload[offset+extension_offset]));
|
||||
memcpy(&extension_id, &packet->payload[offset+extension_offset], 2);
|
||||
extension_offset += 2;
|
||||
|
||||
extension_len = ntohs(*((u_int16_t*)&packet->payload[offset+extension_offset]));
|
||||
memcpy(&extension_len, &packet->payload[offset+extension_offset], 2);
|
||||
extension_offset += 2;
|
||||
|
||||
#ifdef CERTIFICATE_DEBUG
|
||||
printf("SSL [extension_id: %u][extension_len: %u]\n", extension_id, extension_len);
|
||||
#endif
|
||||
extension_id = ntohs(extension_id), extension_len = ntohs(extension_len);
|
||||
|
||||
if(extension_id == 0) {
|
||||
#if 1
|
||||
u_int16_t len;
|
||||
|
||||
len = (packet->payload[offset+extension_offset+3] << 8) + packet->payload[offset+extension_offset+4];
|
||||
len = (u_int)ndpi_min(len, buffer_len-1);
|
||||
strncpy(buffer, (char*)&packet->payload[offset+extension_offset+5], len);
|
||||
buffer[len] = '\0';
|
||||
#else
|
||||
/* old code */
|
||||
u_int begin = 0;
|
||||
u_int begin = 0,len;
|
||||
char *server_name = (char*)&packet->payload[offset+extension_offset];
|
||||
|
||||
|
||||
while(begin < extension_len) {
|
||||
if((!ndpi_isprint(server_name[begin]))
|
||||
|| ndpi_ispunct(server_name[begin])
|
||||
@@ -308,15 +284,13 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
len = (u_int)ndpi_min(extension_len-begin, buffer_len-1);
|
||||
strncpy(buffer, &server_name[begin], len);
|
||||
buffer[len] = '\0';
|
||||
#endif
|
||||
|
||||
stripCertificateTrailer(buffer, buffer_len);
|
||||
|
||||
if(!ndpi_struct->disable_metadata_export) {
|
||||
snprintf(flow->protos.stun_ssl.ssl.client_certificate,
|
||||
sizeof(flow->protos.stun_ssl.ssl.client_certificate), "%s", buffer);
|
||||
}
|
||||
|
||||
|
||||
/* We're happy now */
|
||||
return(2 /* Client Certificate */);
|
||||
}
|
||||
@@ -342,13 +316,12 @@ int sslTryAndRetrieveServerCertificate(struct ndpi_detection_module_struct *ndpi
|
||||
if((packet->payload_packet_len > 9) && (packet->payload[0] == 0x16)) {
|
||||
char certificate[64];
|
||||
int rc;
|
||||
|
||||
certificate[0] = '\0';
|
||||
rc = getSSLcertificate(ndpi_struct, flow, certificate, sizeof(certificate));
|
||||
packet->ssl_certificate_num_checks++;
|
||||
if (rc > 0) {
|
||||
packet->ssl_certificate_detected++;
|
||||
if ((flow->l4.tcp.ssl_seen_server_cert == 1) && (flow->protos.stun_ssl.ssl.server_certificate[0] != '\0'))
|
||||
if (flow->protos.stun_ssl.ssl.server_certificate[0] != '\0')
|
||||
/* 0 means we're done processing extra packets (since we found what we wanted) */
|
||||
return 0;
|
||||
}
|
||||
@@ -400,15 +373,15 @@ int sslDetectProtocolFromCertificate(struct ndpi_detection_module_struct *ndpi_s
|
||||
strlen(certificate),
|
||||
&ret_match,
|
||||
NDPI_PROTOCOL_SSL);
|
||||
|
||||
|
||||
if(subproto != NDPI_PROTOCOL_UNKNOWN) {
|
||||
/* If we've detected the subprotocol from client certificate but haven't had a chance
|
||||
* to see the server certificate yet, set up extra packet processing to wait
|
||||
* a few more packets. */
|
||||
if(((flow->l4.tcp.ssl_seen_client_cert == 1) && (flow->protos.stun_ssl.ssl.client_certificate[0] != '\0')) && ((flow->l4.tcp.ssl_seen_server_cert != 1) && (flow->protos.stun_ssl.ssl.server_certificate[0] == '\0'))) {
|
||||
if((flow->protos.stun_ssl.ssl.client_certificate[0] != '\0') && (flow->protos.stun_ssl.ssl.server_certificate[0] == '\0')) {
|
||||
sslInitExtraPacketProcessing(0, flow);
|
||||
}
|
||||
|
||||
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, subproto,
|
||||
ndpi_ssl_refine_master_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SSL));
|
||||
return(rc); /* Fix courtesy of Gianluca Costa <g.costa@xplico.org> */
|
||||
@@ -422,8 +395,8 @@ int sslDetectProtocolFromCertificate(struct ndpi_detection_module_struct *ndpi_s
|
||||
&& flow->l4.tcp.seen_syn
|
||||
&& flow->l4.tcp.seen_syn_ack
|
||||
&& flow->l4.tcp.seen_ack /* We have seen the 3-way handshake */)
|
||||
|| ((flow->l4.tcp.ssl_seen_server_cert == 1) && (flow->protos.stun_ssl.ssl.server_certificate[0] != '\0'))
|
||||
/* || ((flow->l4.tcp.ssl_seen_client_cert == 1) && (flow->protos.stun_ssl.ssl.client_certificate[0] != '\0')) */
|
||||
|| (flow->protos.stun_ssl.ssl.server_certificate[0] != '\0')
|
||||
/* || (flow->protos.stun_ssl.ssl.client_certificate[0] != '\0') */
|
||||
) {
|
||||
ndpi_int_ssl_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_SSL);
|
||||
}
|
||||
@@ -523,10 +496,13 @@ static u_int8_t ndpi_search_sslv3_direction1(struct ndpi_detection_module_struct
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
|
||||
if((packet->payload_packet_len >= 5)
|
||||
&& ((packet->payload[0] == 0x16) || packet->payload[0] == 0x17)
|
||||
&& (packet->payload[0] == 0x16)
|
||||
&& (packet->payload[1] == 0x03)
|
||||
&& ((packet->payload[2] == 0x00) || (packet->payload[2] == 0x01) ||
|
||||
(packet->payload[2] == 0x02) || (packet->payload[2] == 0x03))) {
|
||||
&& ((packet->payload[2] == 0x00)
|
||||
|| (packet->payload[2] == 0x01)
|
||||
|| (packet->payload[2] == 0x02)
|
||||
|| (packet->payload[2] == 0x03)
|
||||
)) {
|
||||
u_int32_t temp;
|
||||
NDPI_LOG_DBG2(ndpi_struct, "search sslv3\n");
|
||||
// SSLv3 Record
|
||||
@@ -559,7 +535,7 @@ static u_int8_t ndpi_search_sslv3_direction1(struct ndpi_detection_module_struct
|
||||
}
|
||||
}
|
||||
|
||||
if((packet->payload_packet_len > temp) && (packet->payload_packet_len > 100)) {
|
||||
if((packet->payload_packet_len > temp && packet->payload_packet_len > 100) && packet->payload_packet_len > 9) {
|
||||
/* the server hello may be split into small packets and the certificate has its own SSL Record
|
||||
* so temp contains only the length for the first ServerHello block */
|
||||
u_int32_t cert_start;
|
||||
@@ -688,17 +664,6 @@ void ndpi_search_ssl_tcp(struct ndpi_detection_module_struct *ndpi_struct, struc
|
||||
flow->l4.tcp.ssl_stage = 1 + packet->packet_direction;
|
||||
return;
|
||||
}
|
||||
|
||||
// Application Data pkt
|
||||
if(packet->payload[0] == 0x17 && packet->payload[1] == 0x03
|
||||
&& (packet->payload[2] == 0x00 || packet->payload[2] == 0x01 ||
|
||||
packet->payload[2] == 0x02 || packet->payload[2] == 0x03)) {
|
||||
if(packet->payload_packet_len - ntohs(get_u_int16_t(packet->payload, 3)) == 5) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "TLS len match\n");
|
||||
flow->l4.tcp.ssl_stage = 1 + packet->packet_direction;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(packet->payload_packet_len > 40 &&
|
||||
|
||||
@@ -106,7 +106,7 @@ static ndpi_int_stun_t ndpi_int_check_stun(struct ndpi_detection_module_struct *
|
||||
case 0x4002:
|
||||
/* These are the only messages apparently whatsapp voice can use */
|
||||
break;
|
||||
|
||||
|
||||
case 0x8054: /* Candidate Identifier */
|
||||
if((len == 4)
|
||||
&& ((offset+7) < payload_length)
|
||||
@@ -119,20 +119,6 @@ static ndpi_int_stun_t ndpi_int_check_stun(struct ndpi_detection_module_struct *
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x8055: /* MS Service Quality (skype?) */
|
||||
break;
|
||||
|
||||
/* Proprietary fields found on skype calls */
|
||||
case 0x24DF:
|
||||
case 0x3802:
|
||||
case 0x8036:
|
||||
case 0x8095:
|
||||
case 0x0800:
|
||||
/* printf("====>>>> %04X\n", attribute); */
|
||||
flow->protos.stun_ssl.stun.is_skype = 1;
|
||||
return(NDPI_IS_STUN);
|
||||
break;
|
||||
|
||||
case 0x8070: /* Implementation Version */
|
||||
if((len == 4)
|
||||
&& ((offset+7) < payload_length)
|
||||
@@ -203,7 +189,7 @@ void ndpi_search_stun(struct ndpi_detection_module_struct *ndpi_struct, struct n
|
||||
NDPI_LOG_INFO(ndpi_struct, "found Skype\n");
|
||||
|
||||
if((flow->protos.stun_ssl.stun.num_processed_pkts >= 8) || (flow->protos.stun_ssl.stun.num_binding_requests >= 4))
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SKYPE_CALL, NDPI_PROTOCOL_SKYPE);
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, (flow->protos.stun_ssl.stun.num_binding_requests < 4) ? NDPI_PROTOCOL_SKYPE_CALL_IN : NDPI_PROTOCOL_SKYPE_CALL_OUT, NDPI_PROTOCOL_SKYPE);
|
||||
} else {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found UDP stun\n"); /* Ummmmm we're in the TCP branch. This code looks bad */
|
||||
ndpi_int_stun_add_connection(ndpi_struct,
|
||||
@@ -221,10 +207,9 @@ void ndpi_search_stun(struct ndpi_detection_module_struct *ndpi_struct, struct n
|
||||
|
||||
if(flow->protos.stun_ssl.stun.is_skype) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "Found Skype\n");
|
||||
|
||||
/* flow->protos.stun_ssl.stun.num_binding_requests < 4) ? NDPI_PROTOCOL_SKYPE_CALL_IN : NDPI_PROTOCOL_SKYPE_CALL_OUT */
|
||||
|
||||
if((flow->protos.stun_ssl.stun.num_processed_pkts >= 8) || (flow->protos.stun_ssl.stun.num_binding_requests >= 4))
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SKYPE_CALL, NDPI_PROTOCOL_SKYPE);
|
||||
ndpi_set_detected_protocol(ndpi_struct, flow, (flow->protos.stun_ssl.stun.num_binding_requests < 4) ? NDPI_PROTOCOL_SKYPE_CALL_IN : NDPI_PROTOCOL_SKYPE_CALL_OUT, NDPI_PROTOCOL_SKYPE);
|
||||
} else {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found UDP stun\n");
|
||||
ndpi_int_stun_add_connection(ndpi_struct,
|
||||
|
||||
@@ -32,7 +32,7 @@ void ndpi_search_teredo(struct ndpi_detection_module_struct *ndpi_struct, struct
|
||||
NDPI_LOG_DBG(ndpi_struct,"search teredo\n");
|
||||
if(packet->udp
|
||||
&& packet->iph
|
||||
&& ((ntohl(packet->iph->daddr) & 0xF0000000) != 0xE0000000 /* Not a multicast address */)
|
||||
&& ((ntohl(packet->iph->daddr) & 0xF0000000) == 0xE0000000 /* A multicast address */)
|
||||
&& ((ntohs(packet->udp->source) == 3544) || (ntohs(packet->udp->dest) == 3544))
|
||||
&& (packet->payload_packet_len >= 40 /* IPv6 header */)) {
|
||||
NDPI_LOG_INFO(ndpi_struct,"found teredo\n");
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* upnp.c
|
||||
*
|
||||
* Copyright (C) 2018 - ntop.org
|
||||
*
|
||||
* nDPI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* nDPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_UPNP
|
||||
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define UPNP_PORT 3702
|
||||
|
||||
void ndpi_search_upnp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow) {
|
||||
struct ndpi_packet_struct *packet = &flow->packet;
|
||||
|
||||
NDPI_LOG_DBG(ndpi_struct, "search upnp\n");
|
||||
|
||||
if(packet->udp
|
||||
&& (
|
||||
(packet->iph && ((ntohl(packet->iph->daddr) & 0xF0000000) == 0xE0000000 /* A multicast address */))
|
||||
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
||
|
||||
(packet->iphv6 && ntohl(packet->iphv6->ip6_dst.u6_addr.u6_addr32[0]) == 0xFF020000)
|
||||
#endif
|
||||
)
|
||||
&& (ntohs(packet->udp->dest) == UPNP_PORT)
|
||||
&& (packet->payload_packet_len >= 40)
|
||||
&& (strncmp((char*)packet->payload, "<?xml", 5) == 0)
|
||||
) {
|
||||
NDPI_LOG_INFO(ndpi_struct,"found teredo\n");
|
||||
ndpi_int_change_protocol(ndpi_struct, flow, NDPI_PROTOCOL_UPNP, NDPI_PROTOCOL_UNKNOWN);
|
||||
} else {
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void init_upnp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id,
|
||||
NDPI_PROTOCOL_BITMASK *detection_bitmask) {
|
||||
ndpi_set_bitmask_protocol_detection("UPNP", ndpi_struct, detection_bitmask, *id,
|
||||
NDPI_PROTOCOL_UPNP,
|
||||
ndpi_search_upnp,
|
||||
NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_UDP_WITH_PAYLOAD,
|
||||
SAVE_DETECTION_BITMASK_AS_UNKNOWN,
|
||||
ADD_TO_DETECTION_BITMASK);
|
||||
*id += 1;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,5 @@ extern int ht_hash( hashtable_t *hashtable, char *key );
|
||||
extern entry_t *ht_newpair( char *key, u_int16_t value );
|
||||
extern void ht_set( hashtable_t *hashtable, char *key, u_int16_t value );
|
||||
extern u_int16_t ht_get( hashtable_t *hashtable, char *key );
|
||||
extern void ht_free( hashtable_t *hashtable );
|
||||
|
||||
#endif /* _HASH_H_ */
|
||||
+1
-1
@@ -102,7 +102,7 @@ typedef struct the_prefix_t {
|
||||
/* pointer to usr data (ex. route flap info) */
|
||||
union patricia_node_value_t {
|
||||
void *user_data;
|
||||
unsigned int user_value;
|
||||
u_int32_t user_value;
|
||||
};
|
||||
|
||||
typedef struct _patricia_node_t {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ht_hash.h"
|
||||
#include "hash.h"
|
||||
|
||||
/* #define HASH_DEBUG 1 */
|
||||
|
||||
Vendored
-148
@@ -1,148 +0,0 @@
|
||||
/*
|
||||
* SHA-1 hash in C
|
||||
*
|
||||
* Copyright (c) 2017 Project Nayuki. (MIT License)
|
||||
* https://www.nayuki.io/page/fast-sha1-hash-implementation-in-x86-assembly
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
* - The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
* - The Software is provided "as is", without warranty of any kind, express or
|
||||
* implied, including but not limited to the warranties of merchantability,
|
||||
* fitness for a particular purpose and noninfringement. In no event shall the
|
||||
* authors or copyright holders be liable for any claim, damages or other
|
||||
* liability, whether in an action of contract, tort or otherwise, arising from,
|
||||
* out of or in connection with the Software or the use or other dealings in the
|
||||
* Software.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
void sha1_compress(uint32_t state[5], const uint8_t block[64]) {
|
||||
#define ROTL32(x, n) (((0U + (x)) << (n)) | ((x) >> (32 - (n)))) // Assumes that x is uint32_t and 0 < n < 32
|
||||
|
||||
#define LOADSCHEDULE(i) \
|
||||
schedule[i] = (uint32_t)block[i * 4 + 0] << 24 \
|
||||
| (uint32_t)block[i * 4 + 1] << 16 \
|
||||
| (uint32_t)block[i * 4 + 2] << 8 \
|
||||
| (uint32_t)block[i * 4 + 3] << 0;
|
||||
|
||||
#define SCHEDULE(i) \
|
||||
temp = schedule[(i - 3) & 0xF] ^ schedule[(i - 8) & 0xF] ^ schedule[(i - 14) & 0xF] ^ schedule[(i - 16) & 0xF]; \
|
||||
schedule[i & 0xF] = ROTL32(temp, 1);
|
||||
|
||||
#define ROUND0a(a, b, c, d, e, i) LOADSCHEDULE(i) ROUNDTAIL(a, b, e, ((b & c) | (~b & d)) , i, 0x5A827999)
|
||||
#define ROUND0b(a, b, c, d, e, i) SCHEDULE(i) ROUNDTAIL(a, b, e, ((b & c) | (~b & d)) , i, 0x5A827999)
|
||||
#define ROUND1(a, b, c, d, e, i) SCHEDULE(i) ROUNDTAIL(a, b, e, (b ^ c ^ d) , i, 0x6ED9EBA1)
|
||||
#define ROUND2(a, b, c, d, e, i) SCHEDULE(i) ROUNDTAIL(a, b, e, ((b & c) ^ (b & d) ^ (c & d)), i, 0x8F1BBCDC)
|
||||
#define ROUND3(a, b, c, d, e, i) SCHEDULE(i) ROUNDTAIL(a, b, e, (b ^ c ^ d) , i, 0xCA62C1D6)
|
||||
|
||||
#ifndef UINT32_C
|
||||
#define UINT32_C(c)c ## U
|
||||
#endif
|
||||
|
||||
#define ROUNDTAIL(a, b, e, f, i, k) \
|
||||
e = 0U + e + ROTL32(a, 5) + f + UINT32_C(k) + schedule[i & 0xF]; \
|
||||
b = ROTL32(b, 30);
|
||||
|
||||
uint32_t a = state[0];
|
||||
uint32_t b = state[1];
|
||||
uint32_t c = state[2];
|
||||
uint32_t d = state[3];
|
||||
uint32_t e = state[4];
|
||||
|
||||
uint32_t schedule[16];
|
||||
uint32_t temp;
|
||||
ROUND0a(a, b, c, d, e, 0)
|
||||
ROUND0a(e, a, b, c, d, 1)
|
||||
ROUND0a(d, e, a, b, c, 2)
|
||||
ROUND0a(c, d, e, a, b, 3)
|
||||
ROUND0a(b, c, d, e, a, 4)
|
||||
ROUND0a(a, b, c, d, e, 5)
|
||||
ROUND0a(e, a, b, c, d, 6)
|
||||
ROUND0a(d, e, a, b, c, 7)
|
||||
ROUND0a(c, d, e, a, b, 8)
|
||||
ROUND0a(b, c, d, e, a, 9)
|
||||
ROUND0a(a, b, c, d, e, 10)
|
||||
ROUND0a(e, a, b, c, d, 11)
|
||||
ROUND0a(d, e, a, b, c, 12)
|
||||
ROUND0a(c, d, e, a, b, 13)
|
||||
ROUND0a(b, c, d, e, a, 14)
|
||||
ROUND0a(a, b, c, d, e, 15)
|
||||
ROUND0b(e, a, b, c, d, 16)
|
||||
ROUND0b(d, e, a, b, c, 17)
|
||||
ROUND0b(c, d, e, a, b, 18)
|
||||
ROUND0b(b, c, d, e, a, 19)
|
||||
ROUND1(a, b, c, d, e, 20)
|
||||
ROUND1(e, a, b, c, d, 21)
|
||||
ROUND1(d, e, a, b, c, 22)
|
||||
ROUND1(c, d, e, a, b, 23)
|
||||
ROUND1(b, c, d, e, a, 24)
|
||||
ROUND1(a, b, c, d, e, 25)
|
||||
ROUND1(e, a, b, c, d, 26)
|
||||
ROUND1(d, e, a, b, c, 27)
|
||||
ROUND1(c, d, e, a, b, 28)
|
||||
ROUND1(b, c, d, e, a, 29)
|
||||
ROUND1(a, b, c, d, e, 30)
|
||||
ROUND1(e, a, b, c, d, 31)
|
||||
ROUND1(d, e, a, b, c, 32)
|
||||
ROUND1(c, d, e, a, b, 33)
|
||||
ROUND1(b, c, d, e, a, 34)
|
||||
ROUND1(a, b, c, d, e, 35)
|
||||
ROUND1(e, a, b, c, d, 36)
|
||||
ROUND1(d, e, a, b, c, 37)
|
||||
ROUND1(c, d, e, a, b, 38)
|
||||
ROUND1(b, c, d, e, a, 39)
|
||||
ROUND2(a, b, c, d, e, 40)
|
||||
ROUND2(e, a, b, c, d, 41)
|
||||
ROUND2(d, e, a, b, c, 42)
|
||||
ROUND2(c, d, e, a, b, 43)
|
||||
ROUND2(b, c, d, e, a, 44)
|
||||
ROUND2(a, b, c, d, e, 45)
|
||||
ROUND2(e, a, b, c, d, 46)
|
||||
ROUND2(d, e, a, b, c, 47)
|
||||
ROUND2(c, d, e, a, b, 48)
|
||||
ROUND2(b, c, d, e, a, 49)
|
||||
ROUND2(a, b, c, d, e, 50)
|
||||
ROUND2(e, a, b, c, d, 51)
|
||||
ROUND2(d, e, a, b, c, 52)
|
||||
ROUND2(c, d, e, a, b, 53)
|
||||
ROUND2(b, c, d, e, a, 54)
|
||||
ROUND2(a, b, c, d, e, 55)
|
||||
ROUND2(e, a, b, c, d, 56)
|
||||
ROUND2(d, e, a, b, c, 57)
|
||||
ROUND2(c, d, e, a, b, 58)
|
||||
ROUND2(b, c, d, e, a, 59)
|
||||
ROUND3(a, b, c, d, e, 60)
|
||||
ROUND3(e, a, b, c, d, 61)
|
||||
ROUND3(d, e, a, b, c, 62)
|
||||
ROUND3(c, d, e, a, b, 63)
|
||||
ROUND3(b, c, d, e, a, 64)
|
||||
ROUND3(a, b, c, d, e, 65)
|
||||
ROUND3(e, a, b, c, d, 66)
|
||||
ROUND3(d, e, a, b, c, 67)
|
||||
ROUND3(c, d, e, a, b, 68)
|
||||
ROUND3(b, c, d, e, a, 69)
|
||||
ROUND3(a, b, c, d, e, 70)
|
||||
ROUND3(e, a, b, c, d, 71)
|
||||
ROUND3(d, e, a, b, c, 72)
|
||||
ROUND3(c, d, e, a, b, 73)
|
||||
ROUND3(b, c, d, e, a, 74)
|
||||
ROUND3(a, b, c, d, e, 75)
|
||||
ROUND3(e, a, b, c, d, 76)
|
||||
ROUND3(d, e, a, b, c, 77)
|
||||
ROUND3(c, d, e, a, b, 78)
|
||||
ROUND3(b, c, d, e, a, 79)
|
||||
|
||||
state[0] = 0U + state[0] + a;
|
||||
state[1] = 0U + state[1] + b;
|
||||
state[2] = 0U + state[2] + c;
|
||||
state[3] = 0U + state[3] + d;
|
||||
state[4] = 0U + state[4] + e;
|
||||
}
|
||||
+1
-4
@@ -7,10 +7,7 @@ build_results() {
|
||||
for f in $PCAPS; do
|
||||
#echo $f
|
||||
# create result files if not present
|
||||
if [ ! -f result/$f.out ]; then
|
||||
CMD="$READER -q -i pcap/$f -w result/$f.out -v 1"
|
||||
$CMD
|
||||
fi
|
||||
[ ! -f result/$f.out ] && $READER -q -i pcap/$f -w result/$f.out -v 1
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+60
-61
@@ -1,4 +1,4 @@
|
||||
Unknown 21 5946 11
|
||||
Unknown 24 6428 14
|
||||
DNS 2 378 1
|
||||
HTTP 524 220123 9
|
||||
MDNS 1 82 1
|
||||
@@ -10,10 +10,9 @@ QQ 28 5216 2
|
||||
RTP 2 132 1
|
||||
SSL 105 21914 7
|
||||
DHCPV6 10 980 3
|
||||
Facebook 21 7145 4
|
||||
Facebook 19 6840 2
|
||||
Google 3 176 1
|
||||
GenericProtocol 433 311919 14
|
||||
UPnP 1 177 1
|
||||
LLMNR 89 6799 47
|
||||
|
||||
1 TCP 192.168.115.8:49613 <-> 183.131.48.144:80 [proto: 7/HTTP][cat: Web/5][260 pkts/15070 bytes <-> 159 pkts/168623 bytes][Host: 183.131.48.144]
|
||||
@@ -29,17 +28,17 @@ LLMNR 89 6799 47
|
||||
11 TCP 192.168.5.16:53628 <-> 203.69.81.73:80 [proto: 7/HTTP][cat: Web/5][6 pkts/676 bytes <-> 8 pkts/8482 bytes][Host: dl-obs.official.line.naver.jp]
|
||||
12 UDP [fe80::9bd:81dd:2fdc:5750]:1900 -> [ff02::c]:1900 [proto: 12/SSDP][cat: System/18][16 pkts/8921 bytes -> 0 pkts/0 bytes]
|
||||
13 UDP 192.168.5.49:1900 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][16 pkts/8473 bytes -> 0 pkts/0 bytes]
|
||||
14 TCP 119.235.235.84:443 <-> 192.168.5.16:53406 [proto: 91/SSL][cat: Web/5][13 pkts/6269 bytes <-> 10 pkts/1165 bytes]
|
||||
14 TCP 119.235.235.84:443 <-> 192.168.5.16:53406 [proto: 91/SSL][13 pkts/6269 bytes <-> 10 pkts/1165 bytes]
|
||||
15 TCP 192.168.115.8:49608 <-> 203.205.151.234:80 [proto: 7.48/HTTP.QQ][cat: Chat/9][18 pkts/3550 bytes <-> 7 pkts/1400 bytes][Host: vv.video.qq.com]
|
||||
16 UDP 192.168.119.1:67 -> 255.255.255.255:68 [proto: 18/DHCP][cat: Network/14][14 pkts/4788 bytes -> 0 pkts/0 bytes]
|
||||
17 TCP 192.168.5.16:53580 <-> 31.13.87.36:443 [proto: 64.119/SSL_No_Cert.Facebook][cat: SocialNetwork/6][4 pkts/2050 bytes <-> 5 pkts/2297 bytes]
|
||||
17 TCP 192.168.5.16:53580 <-> 31.13.87.36:443 [proto: 91.119/SSL.Facebook][4 pkts/2050 bytes <-> 5 pkts/2297 bytes]
|
||||
18 TCP 192.168.5.16:53623 <-> 192.168.115.75:443 [proto: 91/SSL][cat: Web/5][11 pkts/1959 bytes <-> 8 pkts/1683 bytes][client: 1]
|
||||
19 TCP 192.168.5.16:53625 <-> 192.168.115.75:443 [proto: 91/SSL][cat: Web/5][11 pkts/1955 bytes <-> 8 pkts/1683 bytes][client: 1]
|
||||
20 TCP 192.168.5.16:53629 <-> 192.168.115.75:443 [proto: 91/SSL][cat: Web/5][10 pkts/1895 bytes <-> 7 pkts/1623 bytes][client: 1]
|
||||
21 TCP 192.168.115.8:49605 <-> 106.185.35.110:80 [proto: 7.137/HTTP.GenericProtocol][cat: Streaming/17][8 pkts/1128 bytes <-> 5 pkts/2282 bytes][Host: jp.kankan.1kxun.mobi]
|
||||
22 TCP 192.168.5.16:53626 <-> 192.168.115.75:443 [proto: 91/SSL][cat: Web/5][11 pkts/1943 bytes <-> 8 pkts/1267 bytes][client: 1]
|
||||
23 TCP 192.168.115.8:49597 <-> 106.185.35.110:80 [proto: 7.137/HTTP.GenericProtocol][cat: Streaming/17][10 pkts/1394 bytes <-> 4 pkts/1464 bytes][Host: jp.kankan.1kxun.mobi]
|
||||
24 TCP 31.13.87.1:443 <-> 192.168.5.16:53578 [proto: 64.119/SSL_No_Cert.Facebook][cat: SocialNetwork/6][5 pkts/1006 bytes <-> 5 pkts/1487 bytes]
|
||||
24 TCP 31.13.87.1:443 <-> 192.168.5.16:53578 [proto: 91.119/SSL.Facebook][5 pkts/1006 bytes <-> 5 pkts/1487 bytes]
|
||||
25 UDP 192.168.5.57:55809 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][14 pkts/2450 bytes -> 0 pkts/0 bytes]
|
||||
26 TCP 192.168.115.8:49598 <-> 222.73.254.167:80 [proto: 7.137/HTTP.GenericProtocol][cat: Streaming/17][10 pkts/1406 bytes <-> 4 pkts/980 bytes][Host: kankan.1kxun.com]
|
||||
27 TCP 192.168.115.8:49612 <-> 183.131.48.145:80 [proto: 7/HTTP][cat: Web/5][10 pkts/1428 bytes <-> 4 pkts/867 bytes][Host: 183.131.48.145]
|
||||
@@ -64,7 +63,7 @@ LLMNR 89 6799 47
|
||||
46 UDP [fe80::406:55a8:6453:25dd]:546 -> [ff02::1:2]:547 [proto: 103/DHCPV6][cat: Network/14][5 pkts/490 bytes -> 0 pkts/0 bytes]
|
||||
47 UDP [fe80::beee:7bff:fe0c:b3de]:546 -> [ff02::1:2]:547 [proto: 103/DHCPV6][cat: Network/14][4 pkts/392 bytes -> 0 pkts/0 bytes]
|
||||
48 UDP 192.168.5.16:63372 <-> 168.95.1.1:53 [proto: 5/DNS][cat: Network/14][1 pkts/89 bytes <-> 1 pkts/289 bytes][Host: dl-obs.official.line.naver.jp]
|
||||
49 TCP 192.168.115.8:49596 <-> 203.66.182.87:443 [proto: 91/SSL][cat: Web/5][4 pkts/220 bytes <-> 2 pkts/132 bytes]
|
||||
49 TCP 192.168.115.8:49596 <-> 203.66.182.87:443 [proto: 91/SSL][4 pkts/220 bytes <-> 2 pkts/132 bytes]
|
||||
50 UDP 192.168.5.9:68 -> 255.255.255.255:67 [proto: 18/DHCP][cat: Network/14][1 pkts/342 bytes -> 0 pkts/0 bytes][Host: joanna-pc]
|
||||
51 UDP 192.168.5.41:68 -> 255.255.255.255:67 [proto: 18/DHCP][cat: Network/14][1 pkts/342 bytes -> 0 pkts/0 bytes][Host: kevin-pc]
|
||||
52 UDP 192.168.115.8:60724 <-> 8.8.8.8:53 [proto: 5.137/DNS.GenericProtocol][cat: Streaming/17][2 pkts/146 bytes <-> 1 pkts/137 bytes][Host: pic.1kxun.com]
|
||||
@@ -74,7 +73,7 @@ LLMNR 89 6799 47
|
||||
56 UDP 192.168.115.8:52723 <-> 8.8.8.8:53 [proto: 5.137/DNS.GenericProtocol][cat: Streaming/17][2 pkts/152 bytes <-> 1 pkts/108 bytes][Host: kankan.1kxun.com]
|
||||
57 UDP 192.168.115.8:52723 <-> 168.95.1.1:53 [proto: 5.137/DNS.GenericProtocol][cat: Streaming/17][2 pkts/152 bytes <-> 1 pkts/108 bytes][Host: kankan.1kxun.com]
|
||||
58 UDP 192.168.115.8:51458 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][4 pkts/256 bytes -> 0 pkts/0 bytes][Host: wpad]
|
||||
59 TCP 192.168.5.16:53613 -> 68.233.253.133:80 [proto: 7/HTTP][cat: Web/5][3 pkts/198 bytes -> 0 pkts/0 bytes]
|
||||
59 TCP 192.168.5.16:53613 -> 68.233.253.133:80 [proto: 7/HTTP][3 pkts/198 bytes -> 0 pkts/0 bytes]
|
||||
60 UDP [fe80::9bd:81dd:2fdc:5750]:61548 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/190 bytes -> 0 pkts/0 bytes][Host: caesar-thinkpad]
|
||||
61 UDP [fe80::9bd:81dd:2fdc:5750]:64568 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/190 bytes -> 0 pkts/0 bytes][Host: caesar-thinkpad]
|
||||
62 UDP 192.168.5.45:137 -> 192.168.255.255:137 [proto: 10/NetBIOS][cat: System/18][2 pkts/184 bytes -> 0 pkts/0 bytes]
|
||||
@@ -84,56 +83,53 @@ LLMNR 89 6799 47
|
||||
66 UDP [fe80::e034:7be:d8f9:6197]:49766 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/182 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
67 UDP [fe80::5d92:62a8:ebde:1319]:49735 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/178 bytes -> 0 pkts/0 bytes][Host: wangs-ltw]
|
||||
68 UDP [fe80::5d92:62a8:ebde:1319]:58468 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/178 bytes -> 0 pkts/0 bytes][Host: wangs-ltw]
|
||||
69 UDP 192.168.119.1:56861 -> 255.255.255.255:5678 [proto: 153/UPnP][cat: Network/14][1 pkts/177 bytes -> 0 pkts/0 bytes]
|
||||
70 TCP 192.168.115.8:49581 <-> 64.233.189.128:80 [proto: 7.126/HTTP.Google][cat: Web/5][2 pkts/110 bytes <-> 1 pkts/66 bytes]
|
||||
71 UDP [fe80::4568:efbc:40b1:1346]:50194 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/176 bytes -> 0 pkts/0 bytes][Host: kevin-pc]
|
||||
72 UDP [fe80::4568:efbc:40b1:1346]:57148 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/176 bytes -> 0 pkts/0 bytes][Host: kevin-pc]
|
||||
73 UDP [fe80::5d92:62a8:ebde:1319]:61172 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/174 bytes -> 0 pkts/0 bytes][Host: sonusav]
|
||||
74 UDP [fe80::5d92:62a8:ebde:1319]:53938 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/172 bytes -> 0 pkts/0 bytes][Host: isatap]
|
||||
75 UDP [fe80::5d92:62a8:ebde:1319]:63659 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/172 bytes -> 0 pkts/0 bytes][Host: isatap]
|
||||
76 UDP [fe80::edf5:240a:c8c0:8312]:53962 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/172 bytes -> 0 pkts/0 bytes][Host: ro_x1c]
|
||||
77 UDP [fe80::edf5:240a:c8c0:8312]:61603 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/172 bytes -> 0 pkts/0 bytes][Host: ro_x1c]
|
||||
78 UDP 192.168.119.2:43786 -> 255.255.255.255:5678 [proto: 188.119/QUIC.Facebook][cat: SocialNetwork/6][1 pkts/163 bytes -> 0 pkts/0 bytes]
|
||||
79 UDP 192.168.5.49:61548 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/150 bytes -> 0 pkts/0 bytes][Host: caesar-thinkpad]
|
||||
80 UDP 192.168.5.49:64568 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/150 bytes -> 0 pkts/0 bytes][Host: caesar-thinkpad]
|
||||
81 UDP 192.168.3.95:51451 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/144 bytes -> 0 pkts/0 bytes][Host: 小佛專機]
|
||||
82 UDP 192.168.3.95:54888 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/144 bytes -> 0 pkts/0 bytes][Host: 小佛專機]
|
||||
83 UDP 192.168.3.95:58779 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/144 bytes -> 0 pkts/0 bytes][Host: 小佛專機]
|
||||
84 UDP 192.168.0.100:50925 -> 255.255.255.255:5678 [proto: 188.119/QUIC.Facebook][cat: SocialNetwork/6][1 pkts/142 bytes -> 0 pkts/0 bytes]
|
||||
85 UDP 192.168.5.50:57143 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/142 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
86 UDP 192.168.5.50:62756 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/142 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
87 UDP 192.168.5.48:59797 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/140 bytes -> 0 pkts/0 bytes][Host: kasper-mac]
|
||||
88 UDP 192.168.3.236:62069 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: wangs-ltw]
|
||||
89 UDP 192.168.3.236:65496 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: wangs-ltw]
|
||||
90 UDP 192.168.5.9:58456 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: joanna-pc]
|
||||
91 UDP 192.168.5.9:62822 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: joanna-pc]
|
||||
92 UDP 192.168.101.33:58456 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: joanna-pc]
|
||||
93 UDP 192.168.101.33:62822 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: joanna-pc]
|
||||
94 UDP 192.168.5.37:54506 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: notebook]
|
||||
95 UDP 192.168.5.37:56366 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: notebook]
|
||||
96 UDP 192.168.5.41:54470 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: kevin-pc]
|
||||
97 UDP 192.168.5.44:58702 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: jason-pc]
|
||||
98 UDP 192.168.5.44:59571 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: jason-pc]
|
||||
99 UDP 192.168.5.57:64428 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: usher-pc]
|
||||
100 UDP 192.168.5.57:65150 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: usher-pc]
|
||||
101 UDP 192.168.3.236:51714 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/132 bytes -> 0 pkts/0 bytes][Host: isatap]
|
||||
102 UDP 192.168.3.236:56043 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/132 bytes -> 0 pkts/0 bytes][Host: isatap]
|
||||
103 UDP 192.168.5.47:53962 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/132 bytes -> 0 pkts/0 bytes][Host: ro_x1c]
|
||||
104 UDP 192.168.5.47:61603 -> 224.0.0.252:5355 [proto: 87/RTP][cat: Media/1][2 pkts/132 bytes -> 0 pkts/0 bytes]
|
||||
105 TCP 192.168.5.16:53605 -> 68.233.253.133:80 [proto: 7/HTTP][cat: Web/5][2 pkts/126 bytes -> 0 pkts/0 bytes]
|
||||
106 TCP 192.168.5.16:53622 <-> 192.168.115.75:443 [proto: 91/SSL][cat: Web/5][1 pkts/60 bytes <-> 1 pkts/60 bytes]
|
||||
107 UDP [fe80::f65c:89ff:fe89:e607]:546 -> [ff02::1:2]:547 [proto: 103/DHCPV6][cat: Network/14][1 pkts/98 bytes -> 0 pkts/0 bytes]
|
||||
108 UDP 192.168.5.45:59461 -> 192.168.255.255:137 [proto: 10/NetBIOS][cat: System/18][1 pkts/92 bytes -> 0 pkts/0 bytes]
|
||||
109 UDP 192.168.5.45:59789 -> 192.168.255.255:137 [proto: 10/NetBIOS][cat: System/18][1 pkts/92 bytes -> 0 pkts/0 bytes]
|
||||
110 UDP [fe80::e034:7be:d8f9:6197]:57143 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/91 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
111 UDP [fe80::e034:7be:d8f9:6197]:62756 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/91 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
112 UDP 192.168.5.16:123 -> 17.253.26.125:123 [proto: 9/NTP][cat: System/18][1 pkts/90 bytes -> 0 pkts/0 bytes]
|
||||
113 UDP 192.168.5.64:5353 -> 224.0.0.251:5353 [proto: 8/MDNS][cat: Network/14][1 pkts/82 bytes -> 0 pkts/0 bytes]
|
||||
114 UDP 192.168.5.50:49766 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/71 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
115 UDP 192.168.5.50:50030 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/71 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
116 UDP 192.168.5.41:55593 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/68 bytes -> 0 pkts/0 bytes][Host: kevin-pc]
|
||||
117 UDP 192.168.5.44:59062 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/68 bytes -> 0 pkts/0 bytes][Host: jason-pc]
|
||||
118 UDP 192.168.3.236:59730 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/67 bytes -> 0 pkts/0 bytes][Host: sonusav]
|
||||
69 TCP 192.168.115.8:49581 <-> 64.233.189.128:80 [proto: 7.126/HTTP.Google][2 pkts/110 bytes <-> 1 pkts/66 bytes]
|
||||
70 UDP [fe80::4568:efbc:40b1:1346]:50194 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/176 bytes -> 0 pkts/0 bytes][Host: kevin-pc]
|
||||
71 UDP [fe80::4568:efbc:40b1:1346]:57148 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/176 bytes -> 0 pkts/0 bytes][Host: kevin-pc]
|
||||
72 UDP [fe80::5d92:62a8:ebde:1319]:61172 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/174 bytes -> 0 pkts/0 bytes][Host: sonusav]
|
||||
73 UDP [fe80::5d92:62a8:ebde:1319]:53938 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/172 bytes -> 0 pkts/0 bytes][Host: isatap]
|
||||
74 UDP [fe80::5d92:62a8:ebde:1319]:63659 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/172 bytes -> 0 pkts/0 bytes][Host: isatap]
|
||||
75 UDP [fe80::edf5:240a:c8c0:8312]:53962 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/172 bytes -> 0 pkts/0 bytes][Host: ro_x1c]
|
||||
76 UDP [fe80::edf5:240a:c8c0:8312]:61603 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/172 bytes -> 0 pkts/0 bytes][Host: ro_x1c]
|
||||
77 UDP 192.168.5.49:61548 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/150 bytes -> 0 pkts/0 bytes][Host: caesar-thinkpad]
|
||||
78 UDP 192.168.5.49:64568 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/150 bytes -> 0 pkts/0 bytes][Host: caesar-thinkpad]
|
||||
79 UDP 192.168.3.95:51451 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/144 bytes -> 0 pkts/0 bytes][Host: 小佛專機]
|
||||
80 UDP 192.168.3.95:54888 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/144 bytes -> 0 pkts/0 bytes][Host: 小佛專機]
|
||||
81 UDP 192.168.3.95:58779 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/144 bytes -> 0 pkts/0 bytes][Host: 小佛專機]
|
||||
82 UDP 192.168.5.50:57143 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/142 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
83 UDP 192.168.5.50:62756 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/142 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
84 UDP 192.168.5.48:59797 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/140 bytes -> 0 pkts/0 bytes][Host: kasper-mac]
|
||||
85 UDP 192.168.3.236:62069 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: wangs-ltw]
|
||||
86 UDP 192.168.3.236:65496 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: wangs-ltw]
|
||||
87 UDP 192.168.5.9:58456 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: joanna-pc]
|
||||
88 UDP 192.168.5.9:62822 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: joanna-pc]
|
||||
89 UDP 192.168.101.33:58456 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: joanna-pc]
|
||||
90 UDP 192.168.101.33:62822 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/138 bytes -> 0 pkts/0 bytes][Host: joanna-pc]
|
||||
91 UDP 192.168.5.37:54506 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: notebook]
|
||||
92 UDP 192.168.5.37:56366 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: notebook]
|
||||
93 UDP 192.168.5.41:54470 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: kevin-pc]
|
||||
94 UDP 192.168.5.44:58702 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: jason-pc]
|
||||
95 UDP 192.168.5.44:59571 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: jason-pc]
|
||||
96 UDP 192.168.5.57:64428 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: usher-pc]
|
||||
97 UDP 192.168.5.57:65150 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/136 bytes -> 0 pkts/0 bytes][Host: usher-pc]
|
||||
98 UDP 192.168.3.236:51714 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/132 bytes -> 0 pkts/0 bytes][Host: isatap]
|
||||
99 UDP 192.168.3.236:56043 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/132 bytes -> 0 pkts/0 bytes][Host: isatap]
|
||||
100 UDP 192.168.5.47:53962 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][2 pkts/132 bytes -> 0 pkts/0 bytes][Host: ro_x1c]
|
||||
101 UDP 192.168.5.47:61603 -> 224.0.0.252:5355 [proto: 87/RTP][cat: Media/1][2 pkts/132 bytes -> 0 pkts/0 bytes]
|
||||
102 TCP 192.168.5.16:53605 -> 68.233.253.133:80 [proto: 7/HTTP][2 pkts/126 bytes -> 0 pkts/0 bytes]
|
||||
103 TCP 192.168.5.16:53622 <-> 192.168.115.75:443 [proto: 91/SSL][1 pkts/60 bytes <-> 1 pkts/60 bytes]
|
||||
104 UDP [fe80::f65c:89ff:fe89:e607]:546 -> [ff02::1:2]:547 [proto: 103/DHCPV6][cat: Network/14][1 pkts/98 bytes -> 0 pkts/0 bytes]
|
||||
105 UDP 192.168.5.45:59461 -> 192.168.255.255:137 [proto: 10/NetBIOS][cat: System/18][1 pkts/92 bytes -> 0 pkts/0 bytes]
|
||||
106 UDP 192.168.5.45:59789 -> 192.168.255.255:137 [proto: 10/NetBIOS][cat: System/18][1 pkts/92 bytes -> 0 pkts/0 bytes]
|
||||
107 UDP [fe80::e034:7be:d8f9:6197]:57143 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/91 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
108 UDP [fe80::e034:7be:d8f9:6197]:62756 -> [ff02::1:3]:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/91 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
109 UDP 192.168.5.16:123 -> 17.253.26.125:123 [proto: 9/NTP][cat: System/18][1 pkts/90 bytes -> 0 pkts/0 bytes]
|
||||
110 UDP 192.168.5.64:5353 -> 224.0.0.251:5353 [proto: 8/MDNS][cat: Network/14][1 pkts/82 bytes -> 0 pkts/0 bytes]
|
||||
111 UDP 192.168.5.50:49766 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/71 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
112 UDP 192.168.5.50:50030 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/71 bytes -> 0 pkts/0 bytes][Host: charming-pc]
|
||||
113 UDP 192.168.5.41:55593 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/68 bytes -> 0 pkts/0 bytes][Host: kevin-pc]
|
||||
114 UDP 192.168.5.44:59062 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/68 bytes -> 0 pkts/0 bytes][Host: jason-pc]
|
||||
115 UDP 192.168.3.236:59730 -> 224.0.0.252:5355 [proto: 154/LLMNR][cat: Network/14][1 pkts/67 bytes -> 0 pkts/0 bytes][Host: sonusav]
|
||||
|
||||
|
||||
Undetected flows:
|
||||
@@ -145,6 +141,9 @@ Undetected flows:
|
||||
6 UDP 192.168.140.140:62976 -> 255.255.255.255:62976 [proto: 0/Unknown][1 pkts/359 bytes -> 0 pkts/0 bytes]
|
||||
7 UDP [fe80::4e5e:cff:feea:365]:5678 -> [ff02::1]:5678 [proto: 0/Unknown][1 pkts/197 bytes -> 0 pkts/0 bytes]
|
||||
8 UDP [fe80::4e5e:cff:fe9a:ec54]:5678 -> [ff02::1]:5678 [proto: 0/Unknown][1 pkts/185 bytes -> 0 pkts/0 bytes]
|
||||
9 UDP 59.120.208.218:50151 -> 255.255.255.255:1947 [proto: 0/Unknown][2 pkts/164 bytes -> 0 pkts/0 bytes]
|
||||
10 UDP 192.168.2.186:32768 -> 255.255.255.255:1947 [proto: 0/Unknown][2 pkts/164 bytes -> 0 pkts/0 bytes]
|
||||
11 UDP 59.120.208.212:32768 -> 255.255.255.255:1947 [proto: 0/Unknown][1 pkts/82 bytes -> 0 pkts/0 bytes]
|
||||
9 UDP 192.168.119.1:56861 -> 255.255.255.255:5678 [proto: 0/Unknown][1 pkts/177 bytes -> 0 pkts/0 bytes]
|
||||
10 UDP 59.120.208.218:50151 -> 255.255.255.255:1947 [proto: 0/Unknown][2 pkts/164 bytes -> 0 pkts/0 bytes]
|
||||
11 UDP 192.168.2.186:32768 -> 255.255.255.255:1947 [proto: 0/Unknown][2 pkts/164 bytes -> 0 pkts/0 bytes]
|
||||
12 UDP 192.168.119.2:43786 -> 255.255.255.255:5678 [proto: 0/Unknown][1 pkts/163 bytes -> 0 pkts/0 bytes]
|
||||
13 UDP 192.168.0.100:50925 -> 255.255.255.255:5678 [proto: 0/Unknown][1 pkts/142 bytes -> 0 pkts/0 bytes]
|
||||
14 UDP 59.120.208.212:32768 -> 255.255.255.255:1947 [proto: 0/Unknown][1 pkts/82 bytes -> 0 pkts/0 bytes]
|
||||
|
||||
@@ -11,6 +11,6 @@ Facebook 37 14726 3
|
||||
5 ICMPV6 [2a03:2880:1010:6f03:face:b00c::2]:0 -> [2001:470:1f17:13f:3e97:eff:fe73:4dec]:0 [proto: 102/ICMPV6][cat: Network/14][1 pkts/1314 bytes -> 0 pkts/0 bytes]
|
||||
6 UDP [2001:470:1f16:13f::2]:53959 <-> [2a03:2880:fffe:b:face:b00c::99]:53 [proto: 5.119/DNS.Facebook][cat: SocialNetwork/6][1 pkts/133 bytes <-> 1 pkts/273 bytes][Host: star.c10r.facebook.com]
|
||||
7 UDP [2001:470:1f16:13f::2]:6404 <-> [2a03:2880:fffe:b:face:b00c::99]:53 [proto: 5.119/DNS.Facebook][cat: SocialNetwork/6][1 pkts/133 bytes <-> 1 pkts/261 bytes][Host: star.c10r.facebook.com]
|
||||
8 TCP [2604:a880:1:20::224:b001]:993 <-> [2001:470:1f17:13f:6d69:c72:7313:616f]:35610 [proto: 51/IMAPS][cat: Email/3][1 pkts/152 bytes <-> 1 pkts/106 bytes]
|
||||
9 TCP [2604:a880:1:20::224:b001]:993 <-> [2001:470:1f17:13f:6d69:c72:7313:616f]:56381 [proto: 51/IMAPS][cat: Email/3][1 pkts/152 bytes <-> 1 pkts/106 bytes]
|
||||
8 TCP [2604:a880:1:20::224:b001]:993 <-> [2001:470:1f17:13f:6d69:c72:7313:616f]:35610 [proto: 51/IMAPS][1 pkts/152 bytes <-> 1 pkts/106 bytes]
|
||||
9 TCP [2604:a880:1:20::224:b001]:993 <-> [2001:470:1f17:13f:6d69:c72:7313:616f]:56381 [proto: 51/IMAPS][1 pkts/152 bytes <-> 1 pkts/106 bytes]
|
||||
10 ICMPV6 [2001:470:1f16:13f::2]:0 -> [2604:a880:1:20::224:b001]:0 [proto: 102/ICMPV6][cat: Network/14][1 pkts/200 bytes -> 0 pkts/0 bytes]
|
||||
|
||||
+29
-29
@@ -3,32 +3,32 @@ EAQ 174 10092 29
|
||||
|
||||
1 TCP 10.8.0.1:40467 <-> 173.194.119.24:80 [proto: 7.126/HTTP.Google][cat: Web/5][8 pkts/591 bytes <-> 6 pkts/9998 bytes][Host: www.google.com.br]
|
||||
2 TCP 10.8.0.1:53497 <-> 173.194.119.48:80 [proto: 7.126/HTTP.Google][cat: Web/5][5 pkts/390 bytes <-> 4 pkts/764 bytes][Host: www.google.com]
|
||||
3 UDP 10.8.0.1:39185 <-> 200.194.132.67:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
4 UDP 10.8.0.1:42620 <-> 200.194.148.66:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
5 UDP 10.8.0.1:43641 <-> 200.194.148.68:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
6 UDP 10.8.0.1:43979 <-> 200.194.132.66:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
7 UDP 10.8.0.1:48890 <-> 200.185.125.226:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
8 UDP 10.8.0.1:51569 <-> 200.194.148.67:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
9 UDP 10.8.0.1:52257 <-> 200.185.138.146:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
10 UDP 10.8.0.1:52726 <-> 200.194.132.68:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
11 UDP 10.8.0.1:34687 -> 200.194.141.68:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
12 UDP 10.8.0.1:37985 -> 200.194.129.67:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
13 UDP 10.8.0.1:39221 -> 200.194.137.67:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
14 UDP 10.8.0.1:41438 -> 200.194.141.66:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
15 UDP 10.8.0.1:47714 -> 200.194.129.68:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
16 UDP 10.8.0.1:48563 -> 200.194.141.67:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
17 UDP 10.8.0.1:48666 -> 200.194.129.66:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
18 UDP 10.8.0.1:53354 -> 200.194.137.66:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
19 UDP 10.8.0.1:56128 -> 200.194.133.66:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
20 UDP 10.8.0.1:59959 -> 200.194.137.68:6000 [proto: 190/EAQ][cat: Network/14][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
21 UDP 10.8.0.1:33356 -> 200.194.149.66:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
22 UDP 10.8.0.1:36552 -> 200.194.136.66:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
23 UDP 10.8.0.1:36577 -> 200.194.149.68:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
24 UDP 10.8.0.1:40058 -> 200.194.134.67:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
25 UDP 10.8.0.1:43934 -> 200.194.136.68:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
26 UDP 10.8.0.1:47346 -> 200.194.134.66:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
27 UDP 10.8.0.1:50175 -> 200.194.149.67:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
28 UDP 10.8.0.1:53059 -> 200.194.133.68:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
29 UDP 10.8.0.1:57004 -> 200.194.133.67:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
30 UDP 10.8.0.1:59098 -> 200.194.134.68:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
31 UDP 10.8.0.1:60013 -> 200.194.136.67:6000 [proto: 190/EAQ][cat: Network/14][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
3 UDP 10.8.0.1:39185 <-> 200.194.132.67:6000 [proto: 190/EAQ][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
4 UDP 10.8.0.1:42620 <-> 200.194.148.66:6000 [proto: 190/EAQ][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
5 UDP 10.8.0.1:43641 <-> 200.194.148.68:6000 [proto: 190/EAQ][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
6 UDP 10.8.0.1:43979 <-> 200.194.132.66:6000 [proto: 190/EAQ][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
7 UDP 10.8.0.1:48890 <-> 200.185.125.226:6000 [proto: 190/EAQ][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
8 UDP 10.8.0.1:51569 <-> 200.194.148.67:6000 [proto: 190/EAQ][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
9 UDP 10.8.0.1:52257 <-> 200.185.138.146:6000 [proto: 190/EAQ][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
10 UDP 10.8.0.1:52726 <-> 200.194.132.68:6000 [proto: 190/EAQ][5 pkts/290 bytes <-> 5 pkts/290 bytes]
|
||||
11 UDP 10.8.0.1:34687 -> 200.194.141.68:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
12 UDP 10.8.0.1:37985 -> 200.194.129.67:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
13 UDP 10.8.0.1:39221 -> 200.194.137.67:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
14 UDP 10.8.0.1:41438 -> 200.194.141.66:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
15 UDP 10.8.0.1:47714 -> 200.194.129.68:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
16 UDP 10.8.0.1:48563 -> 200.194.141.67:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
17 UDP 10.8.0.1:48666 -> 200.194.129.66:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
18 UDP 10.8.0.1:53354 -> 200.194.137.66:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
19 UDP 10.8.0.1:56128 -> 200.194.133.66:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
20 UDP 10.8.0.1:59959 -> 200.194.137.68:6000 [proto: 190/EAQ][5 pkts/290 bytes -> 0 pkts/0 bytes]
|
||||
21 UDP 10.8.0.1:33356 -> 200.194.149.66:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
22 UDP 10.8.0.1:36552 -> 200.194.136.66:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
23 UDP 10.8.0.1:36577 -> 200.194.149.68:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
24 UDP 10.8.0.1:40058 -> 200.194.134.67:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
25 UDP 10.8.0.1:43934 -> 200.194.136.68:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
26 UDP 10.8.0.1:47346 -> 200.194.134.66:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
27 UDP 10.8.0.1:50175 -> 200.194.149.67:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
28 UDP 10.8.0.1:53059 -> 200.194.133.68:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
29 UDP 10.8.0.1:57004 -> 200.194.133.67:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
30 UDP 10.8.0.1:59098 -> 200.194.134.68:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
31 UDP 10.8.0.1:60013 -> 200.194.136.67:6000 [proto: 190/EAQ][4 pkts/232 bytes -> 0 pkts/0 bytes]
|
||||
|
||||
@@ -2,27 +2,26 @@ Unknown 1 66 1
|
||||
HTTP 116 91784 6
|
||||
ICMP 5 510 1
|
||||
SSL 2 169 1
|
||||
Facebook 101 62428 4
|
||||
Facebook 251 215986 5
|
||||
Dropbox 5 725 2
|
||||
WhatsApp 150 153558 1
|
||||
Instagram 363 255094 16
|
||||
|
||||
1 TCP 31.13.86.52:80 <-> 192.168.0.103:58216 [proto: 7.142/HTTP.WhatsApp][cat: Chat/9][103 pkts/150456 bytes <-> 47 pkts/3102 bytes]
|
||||
1 TCP 31.13.86.52:80 <-> 192.168.0.103:58216 [proto: 7.119/HTTP.Facebook][103 pkts/150456 bytes <-> 47 pkts/3102 bytes]
|
||||
2 TCP 192.168.0.103:38816 <-> 46.33.70.160:80 [proto: 7.211/HTTP.Instagram][cat: SocialNetwork/6][13 pkts/1118 bytes <-> 39 pkts/57876 bytes][Host: photos-h.ak.instagram.com]
|
||||
3 TCP 192.168.0.103:58052 <-> 82.85.26.162:80 [proto: 7.211/HTTP.Instagram][cat: SocialNetwork/6][37 pkts/2702 bytes <-> 38 pkts/54537 bytes][Host: photos-g.ak.instagram.com]
|
||||
4 TCP 192.168.0.103:44379 <-> 82.85.26.186:80 [proto: 7.211/HTTP.Instagram][cat: SocialNetwork/6][41 pkts/3392 bytes <-> 40 pkts/50024 bytes][Host: photos-e.ak.instagram.com]
|
||||
5 TCP 192.168.0.103:57936 <-> 82.85.26.162:80 [proto: 7.211/HTTP.Instagram][cat: SocialNetwork/6][24 pkts/1837 bytes <-> 34 pkts/48383 bytes][Host: photos-g.ak.instagram.com]
|
||||
6 TCP 192.168.0.103:33936 <-> 31.13.93.52:443 [proto: 64.119/SSL_No_Cert.Facebook][cat: SocialNetwork/6][34 pkts/5555 bytes <-> 34 pkts/40133 bytes]
|
||||
7 TCP 2.22.236.51:80 <-> 192.168.0.103:44151 [proto: 7/HTTP][cat: Web/5][25 pkts/37100 bytes <-> 24 pkts/1584 bytes]
|
||||
8 TCP 192.168.0.103:33976 <-> 77.67.29.17:80 [proto: 7/HTTP][cat: Web/5][14 pkts/924 bytes <-> 20 pkts/28115 bytes]
|
||||
9 TCP 92.122.48.138:80 <-> 192.168.0.103:41562 [proto: 7/HTTP][cat: Web/5][16 pkts/22931 bytes <-> 9 pkts/594 bytes]
|
||||
6 TCP 192.168.0.103:33936 <-> 31.13.93.52:443 [proto: 91.119/SSL.Facebook][34 pkts/5555 bytes <-> 34 pkts/40133 bytes]
|
||||
7 TCP 2.22.236.51:80 <-> 192.168.0.103:44151 [proto: 7/HTTP][25 pkts/37100 bytes <-> 24 pkts/1584 bytes]
|
||||
8 TCP 192.168.0.103:33976 <-> 77.67.29.17:80 [proto: 7/HTTP][14 pkts/924 bytes <-> 20 pkts/28115 bytes]
|
||||
9 TCP 92.122.48.138:80 <-> 192.168.0.103:41562 [proto: 7/HTTP][16 pkts/22931 bytes <-> 9 pkts/594 bytes]
|
||||
10 TCP 192.168.0.103:60908 <-> 46.33.70.136:443 [proto: 91.211/SSL.Instagram][cat: SocialNetwork/6][10 pkts/1369 bytes <-> 9 pkts/7971 bytes][client: igcdn-photos-g-a.akamaihd.net][server: a248.e.akamai.net]
|
||||
11 TCP 192.168.0.103:44558 <-> 46.33.70.174:443 [proto: 91.211/SSL.Instagram][cat: SocialNetwork/6][10 pkts/1545 bytes <-> 7 pkts/4824 bytes][client: igcdn-photos-h-a.akamaihd.net][server: a248.e.akamai.net]
|
||||
12 TCP 31.13.93.52:443 <-> 192.168.0.103:33934 [proto: 64.119/SSL_No_Cert.Facebook][cat: SocialNetwork/6][6 pkts/4699 bytes <-> 6 pkts/1345 bytes]
|
||||
12 TCP 31.13.93.52:443 <-> 192.168.0.103:33934 [proto: 91.119/SSL.Facebook][6 pkts/4699 bytes <-> 6 pkts/1345 bytes]
|
||||
13 TCP 192.168.0.103:41181 <-> 82.85.26.154:443 [proto: 91.211/SSL.Instagram][cat: SocialNetwork/6][8 pkts/896 bytes <-> 6 pkts/4671 bytes][client: igcdn-photos-a-a.akamaihd.net][server: a248.e.akamai.net]
|
||||
14 TCP 192.168.0.103:41182 <-> 82.85.26.154:443 [proto: 91.211/SSL.Instagram][cat: SocialNetwork/6][8 pkts/896 bytes <-> 6 pkts/4671 bytes][client: igcdn-photos-a-a.akamaihd.net][server: a248.e.akamai.net]
|
||||
15 TCP 192.168.0.103:33763 <-> 31.13.93.52:443 [proto: 64.119/SSL_No_Cert.Facebook][cat: SocialNetwork/6][5 pkts/1279 bytes <-> 6 pkts/4118 bytes]
|
||||
16 TCP 192.168.0.103:33935 <-> 31.13.93.52:443 [proto: 64.119/SSL_No_Cert.Facebook][cat: SocialNetwork/6][5 pkts/1279 bytes <-> 5 pkts/4020 bytes]
|
||||
15 TCP 192.168.0.103:33763 <-> 31.13.93.52:443 [proto: 91.119/SSL.Facebook][5 pkts/1279 bytes <-> 6 pkts/4118 bytes]
|
||||
16 TCP 192.168.0.103:33935 <-> 31.13.93.52:443 [proto: 91.119/SSL.Facebook][5 pkts/1279 bytes <-> 5 pkts/4020 bytes]
|
||||
17 TCP 192.168.0.103:57965 <-> 82.85.26.185:80 [proto: 7.211/HTTP.Instagram][cat: SocialNetwork/6][4 pkts/559 bytes <-> 3 pkts/3456 bytes][Host: photos-f.ak.instagram.com]
|
||||
18 TCP 192.168.0.103:56382 <-> 173.252.107.4:443 [proto: 91.211/SSL.Instagram][cat: SocialNetwork/6][9 pkts/1583 bytes <-> 8 pkts/1064 bytes][client: telegraph-ash.instagram.com]
|
||||
19 UDP 192.168.0.106:17500 -> 255.255.255.255:17500 [proto: 121/Dropbox][cat: Cloud/13][4 pkts/580 bytes -> 0 pkts/0 bytes]
|
||||
@@ -32,11 +31,11 @@ Instagram 363 255094 16
|
||||
23 TCP 192.168.0.103:58053 -> 82.85.26.162:80 [proto: 7.211/HTTP.Instagram][cat: SocialNetwork/6][1 pkts/321 bytes -> 0 pkts/0 bytes][Host: photos-g.ak.instagram.com]
|
||||
24 UDP 192.168.0.103:26540 <-> 8.8.8.8:53 [proto: 5.211/DNS.Instagram][cat: SocialNetwork/6][1 pkts/89 bytes <-> 1 pkts/209 bytes][Host: igcdn-photos-g-a.akamaihd.net]
|
||||
25 UDP 192.168.0.103:33603 <-> 8.8.8.8:53 [proto: 5.211/DNS.Instagram][cat: SocialNetwork/6][1 pkts/89 bytes <-> 1 pkts/209 bytes][Host: igcdn-photos-a-a.akamaihd.net]
|
||||
26 TCP 192.168.0.103:38817 <-> 46.33.70.160:80 [proto: 7/HTTP][cat: Web/5][2 pkts/132 bytes <-> 1 pkts/66 bytes]
|
||||
27 TCP 192.168.0.103:57966 <-> 82.85.26.185:80 [proto: 7/HTTP][cat: Web/5][2 pkts/132 bytes <-> 1 pkts/66 bytes]
|
||||
28 TCP 192.168.0.103:58690 -> 46.33.70.159:443 [proto: 91/SSL][cat: Web/5][2 pkts/169 bytes -> 0 pkts/0 bytes]
|
||||
26 TCP 192.168.0.103:38817 <-> 46.33.70.160:80 [proto: 7/HTTP][2 pkts/132 bytes <-> 1 pkts/66 bytes]
|
||||
27 TCP 192.168.0.103:57966 <-> 82.85.26.185:80 [proto: 7/HTTP][2 pkts/132 bytes <-> 1 pkts/66 bytes]
|
||||
28 TCP 192.168.0.103:58690 -> 46.33.70.159:443 [proto: 91/SSL][2 pkts/169 bytes -> 0 pkts/0 bytes]
|
||||
29 UDP 192.168.0.106:17500 -> 192.168.0.255:17500 [proto: 121/Dropbox][cat: Cloud/13][1 pkts/145 bytes -> 0 pkts/0 bytes]
|
||||
30 TCP 46.33.70.150:80 <-> 192.168.0.103:40855 [proto: 7/HTTP][cat: Web/5][1 pkts/74 bytes <-> 1 pkts/66 bytes]
|
||||
30 TCP 46.33.70.150:80 <-> 192.168.0.103:40855 [proto: 7/HTTP][1 pkts/74 bytes <-> 1 pkts/66 bytes]
|
||||
31 UDP 192.168.0.103:27124 -> 8.8.8.8:53 [proto: 5.211/DNS.Instagram][cat: SocialNetwork/6][1 pkts/85 bytes -> 0 pkts/0 bytes][Host: photos-b.ak.instagram.com]
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
DNS 2 217 1
|
||||
HTTP 1 56 1
|
||||
ICMP 1 147 1
|
||||
SSL 23 2689 2
|
||||
SSL 29 4579 3
|
||||
Facebook 215 51809 12
|
||||
Google 16 1031 3
|
||||
HTTP_Proxy 26 3926 1
|
||||
Amazon 8 2071 2
|
||||
Amazon 2 181 1
|
||||
KakaoTalk 55 9990 15
|
||||
|
||||
1 TCP 10.24.82.188:43581 <-> 31.13.68.70:443 [proto: 91.119/SSL.Facebook][cat: SocialNetwork/6][17 pkts/3461 bytes <-> 17 pkts/6194 bytes][client: graph.facebook.com][server: *.facebook.com]
|
||||
@@ -15,14 +15,14 @@ KakaoTalk 55 9990 15
|
||||
5 TCP 10.24.82.188:45213 <-> 31.13.68.84:443 [proto: 91.119/SSL.Facebook][cat: SocialNetwork/6][15 pkts/2508 bytes <-> 13 pkts/5053 bytes][server: *.facebook.com]
|
||||
6 TCP 10.24.82.188:35511 <-> 173.252.97.2:443 [proto: 91.119/SSL.Facebook][cat: SocialNetwork/6][18 pkts/2390 bytes <-> 18 pkts/4762 bytes][server: *.facebook.com]
|
||||
7 TCP 10.24.82.188:37821 <-> 210.103.240.15:443 [proto: 91.193/SSL.KakaoTalk][cat: VoIP/10][13 pkts/2036 bytes <-> 14 pkts/5090 bytes][server: *.kakao.com]
|
||||
8 TCP 10.24.82.188:51021 <-> 103.246.57.251:8080 [proto: 131/HTTP_Proxy][cat: Web/5][17 pkts/2231 bytes <-> 9 pkts/1695 bytes]
|
||||
9 TCP 139.150.0.125:443 <-> 10.24.82.188:46947 [proto: 91/SSL][cat: Web/5][9 pkts/1737 bytes <-> 9 pkts/672 bytes]
|
||||
10 TCP 10.24.82.188:58964 <-> 54.255.253.199:5223 [proto: 91.178/SSL.Amazon][cat: Web/5][3 pkts/290 bytes <-> 3 pkts/1600 bytes][server: *.push.samsungosp.com]
|
||||
8 TCP 10.24.82.188:51021 <-> 103.246.57.251:8080 [proto: 131/HTTP_Proxy][17 pkts/2231 bytes <-> 9 pkts/1695 bytes]
|
||||
9 TCP 139.150.0.125:443 <-> 10.24.82.188:46947 [proto: 91/SSL][9 pkts/1737 bytes <-> 9 pkts/672 bytes]
|
||||
10 TCP 10.24.82.188:58964 <-> 54.255.253.199:5223 [proto: 91/SSL][cat: Web/5][3 pkts/290 bytes <-> 3 pkts/1600 bytes][server: *.push.samsungosp.com]
|
||||
11 TCP 10.24.82.188:37557 <-> 31.13.68.84:80 [proto: 7.119/HTTP.Facebook][cat: SocialNetwork/6][5 pkts/487 bytes <-> 6 pkts/627 bytes][Host: www.facebook.com]
|
||||
12 TCP 10.24.82.188:37553 <-> 31.13.68.84:80 [proto: 7.119/HTTP.Facebook][cat: SocialNetwork/6][5 pkts/487 bytes <-> 5 pkts/571 bytes][Host: www.facebook.com]
|
||||
13 TCP 216.58.221.10:80 <-> 10.24.82.188:35922 [proto: 7.126/HTTP.Google][cat: Web/5][7 pkts/392 bytes <-> 7 pkts/392 bytes]
|
||||
14 TCP 10.24.82.188:42332 <-> 210.103.240.15:443 [proto: 91/SSL][cat: Web/5][2 pkts/112 bytes <-> 3 pkts/168 bytes]
|
||||
15 TCP 31.13.68.73:443 <-> 10.24.82.188:47007 [proto: 91.119/SSL.Facebook][cat: SocialNetwork/6][2 pkts/139 bytes <-> 2 pkts/112 bytes]
|
||||
13 TCP 216.58.221.10:80 <-> 10.24.82.188:35922 [proto: 7.126/HTTP.Google][7 pkts/392 bytes <-> 7 pkts/392 bytes]
|
||||
14 TCP 10.24.82.188:42332 <-> 210.103.240.15:443 [proto: 91/SSL][2 pkts/112 bytes <-> 3 pkts/168 bytes]
|
||||
15 TCP 31.13.68.73:443 <-> 10.24.82.188:47007 [proto: 91.119/SSL.Facebook][2 pkts/139 bytes <-> 2 pkts/112 bytes]
|
||||
16 UDP 10.24.82.188:57816 <-> 10.188.1.1:53 [proto: 5.193/DNS.KakaoTalk][cat: VoIP/10][1 pkts/78 bytes <-> 1 pkts/166 bytes][Host: katalk.kakao.com]
|
||||
17 UDP 10.24.82.188:4017 <-> 10.188.1.1:53 [proto: 5.119/DNS.Facebook][cat: SocialNetwork/6][1 pkts/85 bytes <-> 1 pkts/144 bytes][Host: developers.facebook.com]
|
||||
18 UDP 10.24.82.188:19582 <-> 10.188.1.1:53 [proto: 5.119/DNS.Facebook][cat: SocialNetwork/6][1 pkts/80 bytes <-> 1 pkts/138 bytes][Host: graph.facebook.com]
|
||||
@@ -40,9 +40,9 @@ KakaoTalk 55 9990 15
|
||||
30 UDP 10.24.82.188:24596 <-> 10.188.1.1:53 [proto: 5.119/DNS.Facebook][cat: SocialNetwork/6][1 pkts/78 bytes <-> 1 pkts/118 bytes][Host: api.facebook.com]
|
||||
31 UDP 10.24.82.188:38448 <-> 10.188.1.1:53 [proto: 5.193/DNS.KakaoTalk][cat: VoIP/10][1 pkts/76 bytes <-> 1 pkts/114 bytes][Host: auth.kakao.com]
|
||||
32 UDP 10.24.82.188:58810 <-> 10.188.1.1:53 [proto: 5.193/DNS.KakaoTalk][cat: VoIP/10][1 pkts/76 bytes <-> 1 pkts/114 bytes][Host: item.kakao.com]
|
||||
33 TCP 10.24.82.188:58927 -> 54.255.253.199:5223 [proto: 64.178/SSL_No_Cert.Amazon][cat: Web/5][2 pkts/181 bytes -> 0 pkts/0 bytes]
|
||||
33 TCP 10.24.82.188:58927 -> 54.255.253.199:5223 [proto: 178/Amazon][2 pkts/181 bytes -> 0 pkts/0 bytes]
|
||||
34 UDP 10.24.82.188:43077 <-> 10.188.1.1:53 [proto: 5.193/DNS.KakaoTalk][cat: VoIP/10][1 pkts/81 bytes <-> 1 pkts/97 bytes][Host: dn-l.talk.kakao.com]
|
||||
35 TCP 10.24.82.188:34686 -> 173.194.72.188:5228 [proto: 126/Google][cat: Web/5][1 pkts/164 bytes -> 0 pkts/0 bytes]
|
||||
35 TCP 10.24.82.188:34686 -> 173.194.72.188:5228 [proto: 126/Google][1 pkts/164 bytes -> 0 pkts/0 bytes]
|
||||
36 ICMP 10.24.82.188:0 -> 10.188.191.1:0 [proto: 81/ICMP][cat: Network/14][1 pkts/147 bytes -> 0 pkts/0 bytes]
|
||||
37 TCP 10.24.82.188:49217 -> 216.58.220.174:443 [proto: 91.126/SSL.Google][cat: Web/5][1 pkts/83 bytes -> 0 pkts/0 bytes]
|
||||
38 TCP 120.28.26.242:80 -> 10.24.82.188:34503 [proto: 7/HTTP][cat: Web/5][1 pkts/56 bytes -> 0 pkts/0 bytes]
|
||||
37 TCP 10.24.82.188:49217 -> 216.58.220.174:443 [proto: 91.126/SSL.Google][1 pkts/83 bytes -> 0 pkts/0 bytes]
|
||||
38 TCP 120.28.26.242:80 -> 10.24.82.188:34503 [proto: 7/HTTP][1 pkts/56 bytes -> 0 pkts/0 bytes]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
HTTP 5 280 1
|
||||
QQ 15 1727 1
|
||||
SSL_No_Cert 45 10108 1
|
||||
SSL_No_Cert 74 14132 2
|
||||
RTP 2991 398751 2
|
||||
SSL 5 1198 1
|
||||
Facebook 34 4401 4
|
||||
Facebook 5 377 3
|
||||
Google 4 359 4
|
||||
HTTP_Proxy 16 1838 2
|
||||
Tor 40 10538 1
|
||||
@@ -14,19 +14,19 @@ KakaoTalk_Voice 44 6196 2
|
||||
2 UDP 10.24.82.188:10268 <-> 1.201.1.174:23046 [proto: 87/RTP][cat: Media/1][746 pkts/93906 bytes <-> 742 pkts/104604 bytes]
|
||||
3 TCP 10.24.82.188:58857 <-> 110.76.143.50:9001 [proto: 163/Tor][cat: VPN/2][22 pkts/5326 bytes <-> 18 pkts/5212 bytes]
|
||||
4 TCP 10.24.82.188:32968 <-> 110.76.143.50:8080 [proto: 64/SSL_No_Cert][cat: Web/5][23 pkts/4380 bytes <-> 22 pkts/5728 bytes]
|
||||
5 TCP 10.24.82.188:59954 <-> 173.252.88.128:443 [proto: 64.119/SSL_No_Cert.Facebook][cat: SocialNetwork/6][15 pkts/2932 bytes <-> 14 pkts/1092 bytes]
|
||||
5 TCP 10.24.82.188:59954 <-> 173.252.88.128:443 [proto: 64/SSL_No_Cert][cat: Web/5][15 pkts/2932 bytes <-> 14 pkts/1092 bytes]
|
||||
6 UDP 10.24.82.188:10269 <-> 1.201.1.174:23047 [proto: 194/KakaoTalk_Voice][cat: VoIP/10][12 pkts/1692 bytes <-> 10 pkts/1420 bytes]
|
||||
7 UDP 10.24.82.188:11321 <-> 1.201.1.174:23045 [proto: 194/KakaoTalk_Voice][cat: VoIP/10][11 pkts/1542 bytes <-> 11 pkts/1542 bytes]
|
||||
8 TCP 10.24.82.188:48489 <-> 203.205.147.215:80 [proto: 7.48/HTTP.QQ][cat: Chat/9][8 pkts/1117 bytes <-> 7 pkts/610 bytes][Host: hkminorshort.weixin.qq.com]
|
||||
9 TCP 10.24.82.188:51021 <-> 103.246.57.251:8080 [proto: 131/HTTP_Proxy][cat: Web/5][6 pkts/543 bytes <-> 5 pkts/945 bytes]
|
||||
10 TCP 139.150.0.125:443 <-> 10.24.82.188:46947 [proto: 91/SSL][cat: Web/5][3 pkts/1044 bytes <-> 2 pkts/154 bytes]
|
||||
11 TCP 10.24.82.188:58916 <-> 54.255.185.236:5222 [proto: 178/Amazon][cat: Web/5][2 pkts/225 bytes <-> 2 pkts/171 bytes]
|
||||
12 TCP 10.24.82.188:53974 -> 203.205.151.233:8080 [proto: 131/HTTP_Proxy][cat: Web/5][5 pkts/350 bytes -> 0 pkts/0 bytes]
|
||||
13 TCP 120.28.26.242:80 <-> 10.24.82.188:34533 [proto: 7/HTTP][cat: Web/5][3 pkts/168 bytes <-> 2 pkts/112 bytes]
|
||||
9 TCP 10.24.82.188:51021 <-> 103.246.57.251:8080 [proto: 131/HTTP_Proxy][6 pkts/543 bytes <-> 5 pkts/945 bytes]
|
||||
10 TCP 139.150.0.125:443 <-> 10.24.82.188:46947 [proto: 91/SSL][3 pkts/1044 bytes <-> 2 pkts/154 bytes]
|
||||
11 TCP 10.24.82.188:58916 <-> 54.255.185.236:5222 [proto: 178/Amazon][2 pkts/225 bytes <-> 2 pkts/171 bytes]
|
||||
12 TCP 10.24.82.188:53974 -> 203.205.151.233:8080 [proto: 131/HTTP_Proxy][5 pkts/350 bytes -> 0 pkts/0 bytes]
|
||||
13 TCP 120.28.26.242:80 <-> 10.24.82.188:34533 [proto: 7/HTTP][3 pkts/168 bytes <-> 2 pkts/112 bytes]
|
||||
14 UDP 10.24.82.188:25223 <-> 10.188.1.1:53 [proto: 5.119/DNS.Facebook][cat: SocialNetwork/6][1 pkts/79 bytes <-> 1 pkts/118 bytes][Host: mqtt.facebook.com]
|
||||
15 TCP 10.24.82.188:34686 -> 173.194.72.188:5228 [proto: 126/Google][cat: Web/5][1 pkts/164 bytes -> 0 pkts/0 bytes]
|
||||
16 TCP 173.252.88.128:443 -> 10.24.82.188:59912 [proto: 91.119/SSL.Facebook][cat: SocialNetwork/6][2 pkts/124 bytes -> 0 pkts/0 bytes]
|
||||
17 TCP 10.24.82.188:49217 -> 216.58.220.174:443 [proto: 91.126/SSL.Google][cat: Web/5][1 pkts/83 bytes -> 0 pkts/0 bytes]
|
||||
18 TCP 173.194.117.229:443 -> 10.24.82.188:38380 [proto: 91.126/SSL.Google][cat: Web/5][1 pkts/56 bytes -> 0 pkts/0 bytes]
|
||||
19 TCP 173.252.122.1:443 -> 10.24.82.188:52123 [proto: 91.119/SSL.Facebook][cat: SocialNetwork/6][1 pkts/56 bytes -> 0 pkts/0 bytes]
|
||||
20 TCP 216.58.220.161:443 -> 10.24.82.188:56697 [proto: 91.126/SSL.Google][cat: Web/5][1 pkts/56 bytes -> 0 pkts/0 bytes]
|
||||
15 TCP 10.24.82.188:34686 -> 173.194.72.188:5228 [proto: 126/Google][1 pkts/164 bytes -> 0 pkts/0 bytes]
|
||||
16 TCP 173.252.88.128:443 -> 10.24.82.188:59912 [proto: 91.119/SSL.Facebook][2 pkts/124 bytes -> 0 pkts/0 bytes]
|
||||
17 TCP 10.24.82.188:49217 -> 216.58.220.174:443 [proto: 91.126/SSL.Google][1 pkts/83 bytes -> 0 pkts/0 bytes]
|
||||
18 TCP 173.194.117.229:443 -> 10.24.82.188:38380 [proto: 91.126/SSL.Google][1 pkts/56 bytes -> 0 pkts/0 bytes]
|
||||
19 TCP 173.252.122.1:443 -> 10.24.82.188:52123 [proto: 91.119/SSL.Facebook][1 pkts/56 bytes -> 0 pkts/0 bytes]
|
||||
20 TCP 216.58.220.161:443 -> 10.24.82.188:56697 [proto: 91.126/SSL.Google][1 pkts/56 bytes -> 0 pkts/0 bytes]
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
Mining 637 581074 6
|
||||
|
||||
1 TCP 192.168.1.142:55328 <-> 69.118.54.122:8333 [proto: 42/Mining][cat: Mining/99][2 pkts/281 bytes <-> 137 pkts/191029 bytes]
|
||||
2 TCP 192.168.1.142:55348 <-> 74.89.181.229:8333 [proto: 42/Mining][cat: Mining/99][55 pkts/28663 bytes <-> 117 pkts/134830 bytes]
|
||||
3 TCP 192.168.1.142:55383 <-> 66.68.83.22:8333 [proto: 42/Mining][cat: Mining/99][65 pkts/45271 bytes <-> 96 pkts/70339 bytes]
|
||||
4 TCP 192.168.1.142:55400 <-> 195.218.16.178:8333 [proto: 42/Mining][cat: Mining/99][47 pkts/26824 bytes <-> 72 pkts/55927 bytes]
|
||||
5 TCP 192.168.1.142:55317 <-> 188.165.213.169:8333 [proto: 42/Mining][cat: Mining/99][16 pkts/21673 bytes <-> 3 pkts/1771 bytes]
|
||||
6 TCP 192.168.1.142:55487 <-> 184.58.165.119:8333 [proto: 42/Mining][cat: Mining/99][24 pkts/3082 bytes <-> 3 pkts/1384 bytes]
|
||||
@@ -1,4 +1,4 @@
|
||||
BitTorrent 479 508018 2
|
||||
|
||||
1 TCP 77.222.174.20:2866 <-> 10.0.0.14:46610 [proto: 37/BitTorrent][cat: Download-FileTransfer-FileSharing/7][305 pkts/461770 bytes <-> 126 pkts/8316 bytes]
|
||||
2 TCP 185.56.20.36:53646 <-> 10.0.0.14:35030 [proto: 37/BitTorrent][cat: Download-FileTransfer-FileSharing/7][25 pkts/36414 bytes <-> 23 pkts/1518 bytes]
|
||||
1 TCP 77.222.174.20:2866 <-> 10.0.0.14:46610 [proto: 37/BitTorrent][305 pkts/461770 bytes <-> 126 pkts/8316 bytes]
|
||||
2 TCP 185.56.20.36:53646 <-> 10.0.0.14:35030 [proto: 37/BitTorrent][25 pkts/36414 bytes <-> 23 pkts/1518 bytes]
|
||||
|
||||
@@ -6,10 +6,10 @@ MQTT 7695 668291 4
|
||||
2 TCP 192.168.56.1:53523 <-> 192.168.56.101:17501 [proto: 222/MQTT][cat: RPC/16][918 pkts/76692 bytes <-> 1008 pkts/90434 bytes]
|
||||
3 TCP 192.168.56.1:53522 <-> 192.168.56.101:17501 [proto: 222/MQTT][cat: RPC/16][921 pkts/76872 bytes <-> 1001 pkts/90056 bytes]
|
||||
4 TCP 192.168.56.101:17501 <-> 192.168.56.1:53524 [proto: 222/MQTT][cat: RPC/16][1005 pkts/90274 bytes <-> 914 pkts/76454 bytes]
|
||||
5 UDP 192.168.56.1:50318 <-> 192.168.56.101:17500 [proto: 121/Dropbox][cat: Cloud/13][100 pkts/13960 bytes <-> 100 pkts/6260 bytes]
|
||||
6 UDP 192.168.56.1:50312 <-> 192.168.56.101:17500 [proto: 121/Dropbox][cat: Cloud/13][100 pkts/13947 bytes <-> 100 pkts/6247 bytes]
|
||||
7 UDP 192.168.56.1:50319 <-> 192.168.56.101:17500 [proto: 121/Dropbox][cat: Cloud/13][100 pkts/13921 bytes <-> 100 pkts/6221 bytes]
|
||||
8 UDP 192.168.56.1:50311 <-> 192.168.56.101:17500 [proto: 121/Dropbox][cat: Cloud/13][100 pkts/13910 bytes <-> 100 pkts/6210 bytes]
|
||||
5 UDP 192.168.56.1:50318 <-> 192.168.56.101:17500 [proto: 121/Dropbox][100 pkts/13960 bytes <-> 100 pkts/6260 bytes]
|
||||
6 UDP 192.168.56.1:50312 <-> 192.168.56.101:17500 [proto: 121/Dropbox][100 pkts/13947 bytes <-> 100 pkts/6247 bytes]
|
||||
7 UDP 192.168.56.1:50319 <-> 192.168.56.101:17500 [proto: 121/Dropbox][100 pkts/13921 bytes <-> 100 pkts/6221 bytes]
|
||||
8 UDP 192.168.56.1:50311 <-> 192.168.56.101:17500 [proto: 121/Dropbox][100 pkts/13910 bytes <-> 100 pkts/6210 bytes]
|
||||
9 UDP [bbbb::1]:46819 <-> [bbbb::3]:5683 [proto: 27/COAP][cat: RPC/16][3 pkts/262 bytes <-> 3 pkts/205 bytes]
|
||||
10 UDP [bbbb::1]:33499 <-> [bbbb::3]:5683 [proto: 27/COAP][cat: RPC/16][2 pkts/147 bytes <-> 2 pkts/257 bytes]
|
||||
11 UDP [bbbb::1]:50250 <-> [bbbb::3]:5683 [proto: 27/COAP][cat: RPC/16][2 pkts/158 bytes <-> 2 pkts/151 bytes]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Diameter 6 1980 1
|
||||
|
||||
1 TCP 10.201.9.245:50957 <-> 10.201.9.11:3868 [proto: 237/Diameter][cat: Web/5][3 pkts/1174 bytes <-> 3 pkts/806 bytes]
|
||||
1 TCP 10.201.9.245:50957 <-> 10.201.9.11:3868 [proto: 237/Diameter][3 pkts/1174 bytes <-> 3 pkts/806 bytes]
|
||||
|
||||
@@ -1,17 +1,43 @@
|
||||
Dropbox 848 90532 15
|
||||
MDNS 16 1648 1
|
||||
SSDP 140 61108 22
|
||||
Dropbox 1104 246122 16
|
||||
|
||||
1 UDP 192.168.56.1:50318 <-> 192.168.56.101:17500 [proto: 121/Dropbox][cat: Cloud/13][100 pkts/13960 bytes <-> 100 pkts/6260 bytes]
|
||||
2 UDP 192.168.56.1:50312 <-> 192.168.56.101:17500 [proto: 121/Dropbox][cat: Cloud/13][100 pkts/13947 bytes <-> 100 pkts/6247 bytes]
|
||||
3 UDP 192.168.56.1:50319 <-> 192.168.56.101:17500 [proto: 121/Dropbox][cat: Cloud/13][100 pkts/13921 bytes <-> 100 pkts/6221 bytes]
|
||||
4 UDP 192.168.56.1:50311 <-> 192.168.56.101:17500 [proto: 121/Dropbox][cat: Cloud/13][100 pkts/13910 bytes <-> 100 pkts/6210 bytes]
|
||||
5 UDP 192.168.1.105:17500 -> 192.168.1.255:17500 [proto: 121/Dropbox][cat: Cloud/13][6 pkts/1422 bytes -> 0 pkts/0 bytes]
|
||||
6 UDP 192.168.1.105:17500 -> 255.255.255.255:17500 [proto: 121/Dropbox][cat: Cloud/13][6 pkts/1422 bytes -> 0 pkts/0 bytes]
|
||||
7 UDP 192.168.1.105:36173 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][4 pkts/312 bytes <-> 4 pkts/1078 bytes][Host: log.getdropbox.com]
|
||||
8 UDP 192.168.1.105:55407 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][2 pkts/156 bytes <-> 2 pkts/666 bytes][Host: client.dropbox.com]
|
||||
9 UDP 192.168.1.105:50789 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][2 pkts/146 bytes <-> 2 pkts/646 bytes][Host: d.dropbox.com]
|
||||
10 UDP 192.168.1.105:49112 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][2 pkts/162 bytes <-> 2 pkts/612 bytes][Host: client-cf.dropbox.com]
|
||||
11 UDP 192.168.1.105:33189 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][2 pkts/156 bytes <-> 2 pkts/588 bytes][Host: notify.dropbox.com]
|
||||
12 UDP 192.168.1.6:17500 -> 192.168.1.255:17500 [proto: 121/Dropbox][cat: Cloud/13][3 pkts/630 bytes -> 0 pkts/0 bytes]
|
||||
13 UDP 192.168.1.6:17500 -> 255.255.255.255:17500 [proto: 121/Dropbox][cat: Cloud/13][3 pkts/630 bytes -> 0 pkts/0 bytes]
|
||||
14 UDP 192.168.1.64:17500 -> 192.168.1.255:17500 [proto: 121/Dropbox][cat: Cloud/13][3 pkts/615 bytes -> 0 pkts/0 bytes]
|
||||
15 UDP 192.168.1.64:17500 -> 255.255.255.255:17500 [proto: 121/Dropbox][cat: Cloud/13][3 pkts/615 bytes -> 0 pkts/0 bytes]
|
||||
1 TCP 192.168.1.105:44949 <-> 54.240.174.31:443 [proto: 91.121/SSL.Dropbox][cat: Cloud/13][64 pkts/12228 bytes <-> 74 pkts/85074 bytes][client: client-cf.dropbox.com][server: client-cf.dropbox.com]
|
||||
2 TCP 192.168.1.105:47747 <-> 108.160.172.225:443 [proto: 91.121/SSL.Dropbox][cat: Cloud/13][28 pkts/12486 bytes <-> 26 pkts/14946 bytes][client: d.dropbox.com]
|
||||
3 UDP 192.168.56.1:50318 <-> 192.168.56.101:17500 [proto: 121/Dropbox][100 pkts/13960 bytes <-> 100 pkts/6260 bytes]
|
||||
4 UDP 192.168.56.1:50312 <-> 192.168.56.101:17500 [proto: 121/Dropbox][100 pkts/13947 bytes <-> 100 pkts/6247 bytes]
|
||||
5 UDP 192.168.56.1:50319 <-> 192.168.56.101:17500 [proto: 121/Dropbox][100 pkts/13921 bytes <-> 100 pkts/6221 bytes]
|
||||
6 UDP 192.168.56.1:50311 <-> 192.168.56.101:17500 [proto: 121/Dropbox][100 pkts/13910 bytes <-> 100 pkts/6210 bytes]
|
||||
7 UDP 192.168.1.254:50828 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][44 pkts/19936 bytes -> 0 pkts/0 bytes]
|
||||
8 TCP 192.168.1.105:59975 <-> 108.160.172.204:443 [proto: 91.121/SSL.Dropbox][cat: Cloud/13][18 pkts/3562 bytes <-> 16 pkts/14464 bytes][client: client.dropbox.com][server: *.dropbox.com]
|
||||
9 TCP 192.168.1.105:46394 <-> 162.125.17.131:443 [proto: 91.121/SSL.Dropbox][cat: Cloud/13][12 pkts/2338 bytes <-> 10 pkts/9054 bytes][client: notify.dropbox.com][server: *.dropbox.com]
|
||||
10 TCP 192.168.1.105:36226 <-> 108.160.172.195:80 [proto: 7.121/HTTP.Dropbox][cat: Cloud/13][10 pkts/2170 bytes <-> 10 pkts/1758 bytes][Host: log.getdropbox.com]
|
||||
11 UDP 192.168.1.101:1650 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
12 UDP 192.168.1.101:2141 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
13 UDP 192.168.1.101:2873 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
14 UDP 192.168.1.101:3412 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
15 UDP 192.168.1.101:3547 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
16 UDP 192.168.1.101:3959 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
17 UDP 192.168.1.101:4169 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
18 UDP 192.168.1.101:4171 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
19 UDP 192.168.1.101:4625 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
20 UDP 192.168.1.101:4974 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][6 pkts/2836 bytes -> 0 pkts/0 bytes]
|
||||
21 UDP 192.168.1.106:57268 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][16 pkts/2632 bytes -> 0 pkts/0 bytes]
|
||||
22 UDP 192.168.1.106:5353 -> 224.0.0.251:5353 [proto: 8/MDNS][cat: Network/14][16 pkts/1648 bytes -> 0 pkts/0 bytes]
|
||||
23 UDP 192.168.1.105:17500 -> 192.168.1.255:17500 [proto: 121/Dropbox][cat: Cloud/13][6 pkts/1422 bytes -> 0 pkts/0 bytes]
|
||||
24 UDP 192.168.1.105:17500 -> 255.255.255.255:17500 [proto: 121/Dropbox][cat: Cloud/13][6 pkts/1422 bytes -> 0 pkts/0 bytes]
|
||||
25 UDP 192.168.1.105:36173 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][4 pkts/312 bytes <-> 4 pkts/1078 bytes][Host: log.getdropbox.com]
|
||||
26 UDP 192.168.1.101:1280 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
27 UDP 192.168.1.101:1346 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
28 UDP 192.168.1.101:1908 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
29 UDP 192.168.1.101:2159 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
30 UDP 192.168.1.101:2169 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
31 UDP 192.168.1.101:2544 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
32 UDP 192.168.1.101:2604 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
33 UDP 192.168.1.101:2991 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
34 UDP 192.168.1.101:3731 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
35 UDP 192.168.1.101:3777 -> 239.255.255.250:1900 [proto: 12/SSDP][cat: System/18][2 pkts/1018 bytes -> 0 pkts/0 bytes]
|
||||
36 UDP 192.168.1.105:55407 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][2 pkts/156 bytes <-> 2 pkts/666 bytes][Host: client.dropbox.com]
|
||||
37 UDP 192.168.1.105:50789 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][2 pkts/146 bytes <-> 2 pkts/646 bytes][Host: d.dropbox.com]
|
||||
38 UDP 192.168.1.105:49112 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][2 pkts/162 bytes <-> 2 pkts/612 bytes][Host: client-cf.dropbox.com]
|
||||
39 UDP 192.168.1.105:33189 <-> 192.168.1.254:53 [proto: 5.121/DNS.Dropbox][cat: Cloud/13][2 pkts/156 bytes <-> 2 pkts/588 bytes][Host: notify.dropbox.com]
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
Mining 819 134165 2
|
||||
|
||||
1 TCP 192.168.2.92:57726 <-> 94.23.36.128:4444 [proto: 42/Mining][cat: Mining/99][478 pkts/52883 bytes <-> 308 pkts/76667 bytes]
|
||||
2 TCP 192.168.2.92:41680 <-> 91.121.222.33:4444 [proto: 42/Mining][cat: Mining/99][20 pkts/2159 bytes <-> 13 pkts/2456 bytes]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user