Browse Source

nfqws: code refactoring. split/split2 modes.

pull/53/head
bol-van 6 years ago
parent
commit
796a5a221f
  1. BIN
      binaries/aarch64/nfqws
  2. BIN
      binaries/armhf/nfqws
  3. BIN
      binaries/mips32r1-lsb/nfqws
  4. BIN
      binaries/mips32r1-msb/nfqws
  5. BIN
      binaries/mips64r2-msb/nfqws
  6. BIN
      binaries/ppc/nfqws
  7. BIN
      binaries/x86/nfqws
  8. BIN
      binaries/x86_64/nfqws
  9. 5
      docs/changes.txt
  10. 11
      docs/readme.eng.txt
  11. 14
      docs/readme.txt
  12. 15
      init.d/openwrt/custom-desync-keepalive
  13. 15
      init.d/sysv/custom-desync-keepalive

BIN
binaries/aarch64/nfqws

Binary file not shown.

BIN
binaries/armhf/nfqws

Binary file not shown.

BIN
binaries/mips32r1-lsb/nfqws

Binary file not shown.

BIN
binaries/mips32r1-msb/nfqws

Binary file not shown.

BIN
binaries/mips64r2-msb/nfqws

Binary file not shown.

BIN
binaries/ppc/nfqws

Binary file not shown.

BIN
binaries/x86/nfqws

Binary file not shown.

BIN
binaries/x86_64/nfqws

Binary file not shown.

5
docs/changes.txt

@ -152,3 +152,8 @@ ip exclude system
v30
nfqws : DPI desync attack modes : fake,rst
v31
nfqws : DPI desync attack modes : disorder,disorder2,split,split2.
nfqws : DPI desync fooling mode : badseq. multiple modes supported

11
docs/readme.eng.txt

@ -139,7 +139,7 @@ It takes the following parameters:
--pidfile=<filename> ; write pid to file
--user=<username> ; drop root privs
--uid=uid[:gid] ; drop root privs
--dpi-desync[=<mode>] ; try to desync dpi state. modes : fake rst rstack disorder disorder2
--dpi-desync[=<mode>] ; try to desync dpi state. modes : fake rst rstack disorder disorder2 split split2
--dpi-desync-fwmark=<int|0xHEX> ; override fwmark for desync packet. default = 0x40000000
--dpi-desync-ttl=<int> ; set ttl for desync packet
--dpi-desync-fooling=none|md5sig|ts|badseq|badsum ; can take multiple comma separated values
@ -196,7 +196,14 @@ If position is higher than packet length, pos=1 is used.
This sequence is designed to make reconstruction of critical message as difficult as possible.
Fake segments may not be required to bypass some DPIs, but can potentially help if more sophisticated reconstruction
algorithms are used.
Mode 'disorder2' disables sending of fake segments. It can be used as a faster alternative to --wsize.
Mode 'disorder2' disables sending of fake segments.
Split mode is very similar to disorder but without segment reordering :
1. 1st segment
2. fake 1st segment, data filled with zeroes
3. fake 1st segment, data filled with zeroes (2nd copy)
4. 2nd segment
Mode 'split2' disables sending of fake segments. It can be used as a faster alternative to --wsize.
There are DPIs that analyze responses from the server, particularly the certificate from the ServerHello
that contain domain name(s). The ClientHello delivery confirmation is an ACK packet from the server

14
docs/readme.txt

@ -1,4 +1,4 @@
zapret v.30
zapret v.31
English
-------
@ -167,7 +167,7 @@ nfqws
--hostcase ; менять регистр заголовка "Host:" по умолчанию на "host:".
--hostnospace ; убрать пробел после "Host:" и переместить его в конец значения "User-Agent:" для сохранения длины пакета
--hostspell=HoST ; точное написание заголовка Host (можно "HOST" или "HoSt"). автоматом включает --hostcase
--dpi-desync[=<mode>] ; атака по десинхронизации DPI. mode : fake rst rstack disorder disorder2
--dpi-desync[=<mode>] ; атака по десинхронизации DPI. mode : fake rst rstack disorder disorder2 split split2
--dpi-desync-fwmark=<int|0xHEX> ; бит fwmark для пометки десинхронизирующих пакетов, чтобы они повторно не падали в очередь. default = 0x40000000
--dpi-desync-ttl=<int> ; установить ttl для десинхронизирующих пакетов
--dpi-desync-fooling=none|md5sig|ts|badseq|badsum ; дополнительные методики как сделать, чтобы фейковый пакет не дошел до сервера
@ -226,7 +226,15 @@ nfqws
Этой последовательностью для DPI максимально усложняется задача реконструкции начального сообщения,
по которому принимается решение о блокировке. Некоторым DPI хватит и tcp сегментов в неправильном порядке,
поддельные части сделаны для дополнительной надежности и более сложных алгоритмов реконструкции.
Режим disorder2 отключает отправку поддельных частей. Он может быть использован как более быстрая альтернатива --wsize.
Режим disorder2 отключает отправку поддельных частей.
Режим split очень похож на disorder, только нет изменения порядка следования сегментов :
1. поддельная 1-я часть пакета, поле данных заполнено нулями
2. 1-я часть пакета
3. поддельная 1-я часть пакета, поле данных заполнено нулями. отсылка 2-й раз.
4. 2-я часть пакета
Режим split2 отключает отправку поддельных частей.
Он может быть использован как более быстрая альтернатива --wsize.
Есть DPI, которые анализируют ответы от сервера, в частности сертификат из ServerHello, где прописаны домены.
Подтверждением доставки ClientHello является ACK пакет от сервера с номером ACK sequence, соответствующим длине ClientHello+1.

15
init.d/openwrt/custom-desync-keepalive

@ -0,0 +1,15 @@
# this script contain your special code to launch daemons and configure firewall
# use helpers from "functions" file and "zapret" init script
# in case of upgrade keep this file only, do not modify others
zapret_custom_daemons()
{
run_daemon 1 $NFQWS "$NFQWS_OPT_BASE $NFQWS_OPT_DESYNC"
}
zapret_custom_firewall()
{
local desync_http="--dport 80 -m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
local desync_https="--dport 443 -m connbytes --connbytes-dir=original --connbytes-mode=packets --connbytes 2:4 -m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
fw_nfqws_post "$desync_http" "$desync_http" $QNUM
fw_nfqws_post "$desync_https" "$desync_https" $QNUM
}

15
init.d/sysv/custom-desync-keepalive

@ -0,0 +1,15 @@
# this script contain your special code to launch daemons and configure firewall
# use helpers from "functions" file and "zapret" init script
# in case of upgrade keep this file only, do not modify others
zapret_custom_daemons()
{
run_daemon $1 1 $NFQWS "$NFQWS_OPT_BASE $NFQWS_OPT_DESYNC"
}
zapret_custom_firewall()
{
local desync_http="--dport 80 -m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
local desync_https="--dport 443 -m connbytes --connbytes-dir=original --connbytes-mode=packets --connbytes 2:4 -m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
fw_nfqws_post $1 "$desync_http" "$desync_http" $QNUM
fw_nfqws_post $1 "$desync_https" "$desync_https" $QNUM
}
Loading…
Cancel
Save