Commit Graph

57 Commits

Author SHA1 Message Date
Christian Ulrich 0750af1a13
introduce new Puncher interface; implement puncher interface for tcp-syni and tcp-nutss 2020-10-24 18:44:37 +02:00
Christian Ulrich fc9219ed80
introduce generic puncher; split tcp_syni into connect and accept modules 2020-10-12 21:31:55 +02:00
Christian Ulrich 1b47048aad
don't export ConnectAttempt and AcceptAttempt 2020-10-11 12:49:25 +02:00
Christian Ulrich 99912b4b69
rawFd -> injectFd 2020-10-10 12:35:36 +02:00
Christian Ulrich a646815e49
rename fromIpAddress -> getNetworkInterface 2020-10-10 12:31:18 +02:00
Christian Ulrich 1116d06e82
refactor: create raw sockets where they are used 2020-10-10 12:30:14 +02:00
Christian Ulrich 60765f3c8a
fix file descriptor leak by using own implementation of getPrimaryIPAddr 2020-10-10 11:48:56 +02:00
Christian Ulrich f50dada999
raise exception on OSError during accept 2020-10-08 19:49:18 +02:00
Christian Ulrich 8bff4c79d9
debug messages for both incoming and outgoing SYNs 2020-10-08 18:13:30 +02:00
Christian Ulrich b0032c534c
use random sequence number for outgoing low-TTL SYN 2020-10-08 18:12:59 +02:00
Christian Ulrich 37f02bc2ba
predict dst ports while accepting too; inject low-TTL SYN instead of using connect 2020-10-08 00:20:54 +02:00
Christian Ulrich 282c0ea6ab
close accepted socket if no attempt was found 2020-10-07 09:36:15 +02:00
Christian Ulrich 4d96a58e87
delete attempts in proc cleanup 2020-10-07 09:23:24 +02:00
Christian Ulrich 12992f5ced
Revert "delete attempts in proc cleanup"
This reverts commit af244030bf.
2020-10-07 09:22:53 +02:00
Christian Ulrich af244030bf
delete attempts in proc cleanup 2020-10-07 09:22:03 +02:00
Christian Ulrich bec4c1b158
close on failed low-TTL connects too 2020-10-07 00:25:07 +02:00
Christian Ulrich 64cc41eb90
Revert "close on failed low-TTL connects too"
This reverts commit 778d8752d2.
2020-10-07 00:23:40 +02:00
Christian Ulrich 778d8752d2
close on failed low-TTL connects too 2020-10-07 00:22:07 +02:00
Christian Ulrich 572b443ea0
must await all calls to injectTcpPacket before closing rawFd 2020-10-07 00:03:46 +02:00
Christian Ulrich 99658cb49c
close raw sockets too 2020-10-06 23:50:13 +02:00
Christian Ulrich 1f16800b73
always close sockets 2020-10-06 23:27:48 +02:00
Christian Ulrich 02b36516b4
check if we can stop accepting on successfull accept 2020-10-05 17:42:12 +02:00
Christian Ulrich 02665220ef
add FIXME 2020-10-05 17:23:23 +02:00
Christian Ulrich daa31f285d
close socket when we stop accepting 2020-10-04 11:43:46 +02:00
Christian Ulrich 9e3b7fe987
fix return value of find*Attempt procs 2020-10-02 17:18:31 +02:00
Christian Ulrich 84cb8611ef
change puncher interface to allow accepting multiple connections 2020-10-02 17:12:29 +02:00
Christian Ulrich dce5115c5c
don't hard-code port; rename probed -> public 2020-09-25 22:59:53 +02:00
Christian Ulrich 56bfb253e5
more meaningful debug messages 2020-09-25 17:19:34 +02:00
Christian Ulrich 006ec73361
add timeouts 2020-08-27 00:03:14 +02:00
Christian Ulrich 0fe1b6ac06
FIXME was solved 2020-08-26 22:39:57 +02:00
Christian Ulrich 7b4f3b790e
only use one destination port for now 2020-08-26 21:34:35 +02:00
Christian Ulrich 7d2a92346d
don't force 3 ports / sequence numbers 2020-08-26 21:33:13 +02:00
Christian Ulrich 0125993ccd
include TCP window size and reuse parsed packet when resending 2020-08-23 22:48:34 +02:00
Christian Ulrich fe2b52f168
need TCP acknowledgment number 2020-08-23 22:38:10 +02:00
Christian Ulrich 239131eae5
break both loop to stop packet flood 2020-08-23 16:02:28 +02:00
Christian Ulrich 7bc90f02b8
need a second socket for injecting 2020-08-23 15:52:50 +02:00
Christian Ulrich e745141b51
have to resend ACK, not SYN+ACK 2020-08-23 15:17:19 +02:00
Christian Ulrich acfcb79108
resend SYN+ACK with normal TTL 2020-08-23 14:36:19 +02:00
Christian Ulrich 1dc7cf6676
try to implement clean firewall rule creation / destruction 2020-08-21 23:12:45 +02:00
Christian Ulrich f5d36f82d5
fix firewall logic 2020-08-18 00:34:21 +02:00
Christian Ulrich a6d14a3b06
insert firewall rule at the head of the chain instead of appending 2020-08-16 15:45:18 +02:00
Christian Ulrich 12ef92dfe9
use IpAddress instead of string 2020-07-22 01:28:55 +02:00
Christian Ulrich 02a96ac412
make asyncExecCmd return the console output and raise an exception if exitcode != 0 2020-07-21 22:56:06 +02:00
Christian Ulrich 187b232162
use dynamic length of destination ports and captured sequence numbers (3 for now) 2020-07-21 11:10:56 +02:00
Christian Ulrich 3f9cb6a3b1
only accept once and only use one injection socket 2020-07-18 15:04:46 +02:00
Christian Ulrich ef68519eec
fix 'invalid argument' by using a separate socket for listening 2020-07-18 13:06:22 +02:00
Christian Ulrich 10f9ca135a
fix direction again; make sure injection happens after low-ttl reponse was received 2020-07-18 12:41:07 +02:00
Christian Ulrich 4499c09e85
fix direction 2020-07-17 21:32:33 +02:00
Christian Ulrich c5f6348cf2
must use sendTo to inject ip packet 2020-07-17 20:06:52 +02:00
Christian Ulrich 95f074e202
first TCP packet always has only SYN flag 2020-07-17 10:37:33 +02:00