Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fixes in kern_netfilter & openssl-mod-client #56

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Examples/Crusher/Linux/OpenSSL_mod_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ $ git checkout 5c3c8369f3b42ce4b816606bb9bbad00c664a416
value = mutate_int(value, len);
```

Также необходимо скопировать `mod-client-api/` в `openssl/`
и добавить соответствующий include в файлы с мутациями.
Также необходимо скопировать `crusher/mod-client-api/` в `openssl/` и добавить соответствующий include в файлы с мутациями.

Все патчи - см. `client/client.patch`. Применим их:
```shell
Expand All @@ -210,8 +209,7 @@ $ git apply ../client.patch
```shell
$ make clean && make distclean
$ ./config no-shared no-tests
# В Makefile в правило для сборки цели apps/openssl в конце добавить mod-client-api/libmodclient.a
$ make -j
$ make -j EX_LIBS=./mod-client-api/libmodclient.a
$ cp apps/openssl ../openssl-clean
```

Expand Down
8 changes: 4 additions & 4 deletions Examples/Crusher/Linux/OpenSSL_mod_client/client/client.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/apps/s_client.c b/apps/s_client.c
index a6c5a559a9..e4b2b34856 100644
index a6c5a559a9..96ec761687 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -48,6 +48,42 @@ typedef unsigned int u_int;
Expand Down Expand Up @@ -49,7 +49,7 @@ index a6c5a559a9..e4b2b34856 100644
return 0;
}

+#include "../../mod-client-api/mod-client-api.h"
+#include "../mod-client-api/mod-client-api.h"
+
+#include <signal.h>
+
Expand Down Expand Up @@ -103,14 +103,14 @@ index a6c5a559a9..e4b2b34856 100644
size_t outlen = user_data->buflen;

diff --git a/crypto/packet.c b/crypto/packet.c
index ac5c2e33f8..147dc1f563 100644
index ac5c2e33f8..6bece6a57f 100644
--- a/crypto/packet.c
+++ b/crypto/packet.c
@@ -207,9 +207,14 @@ int WPACKET_set_flags(WPACKET *pkt, unsigned int flags)
return 1;
}

+#include "../../mod-client-api/mod-client-api.h"
+#include "../mod-client-api/mod-client-api.h"
+
/* Store the |value| of length |len| at location |data| */
static int put_value(unsigned char *data, uint64_t value, size_t len)
Expand Down
Binary file not shown.

This file was deleted.

5 changes: 1 addition & 4 deletions Examples/Crusher/Linux/OpenSSL_mod_client/plugins/conf.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
"""
This configurator script provides for firefox unique value of "-P" (profile) option.
This avoids conflicts when multiple firefox instances are running.
We assume that these profiles already exist - they must be created manually or with environment script (env.py),
which is run before this script.
This configurator script provides differential fuzzing by replacing of target binaries in some instances with sanitized ones.
"""

import json
Expand Down
5 changes: 2 additions & 3 deletions Examples/Crusher/Linux/kern_netfilter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ target4/target/

```shell
./crusher/bin_x86-64/fuzz_manager --start 20 -i in -o out \
-I nyx -F --affinity --max-file-size 1 \
-I nyx -F --max-file-size 1 \
--wait-next-instance 1000 -- ./target/ __DATA__
```

Expand All @@ -128,7 +128,6 @@ target4/target/
- `-o <path>` - папка с результатами;
- `-I <type>` - тип инструментации;
- `-F` - очищать папку с предыдущими результатами;
- `--affinity` - привязка процессов (fuzz, eat) к определённым ядрам;
- `--max-file-size <megabytes>` - ограничение на входные данные;
- `--wait-next-instance <milliseconds>` - ожидание перед запуском каждого fuzz/eat процесса.

Expand Down Expand Up @@ -191,7 +190,7 @@ target7/target/

```shell
./crusher/bin_x86-64/fuzz_manager --start 10 -i in -o out \
-I nyx -F --affinity --max-file-size 1 \
-I nyx -F --max-file-size 1 \
--wait-next-instance 1000 -- ./target/ __DATA__
```

Expand Down
2 changes: 1 addition & 1 deletion Examples/Crusher/Linux/nginx_docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ docker build --network host -f Dockerfile . -t nginx-demo
-t 10000 --wait-next-instance 2000 -F \
--clean-binary /root/target/nginx-clean/sbin/nginx \
--bitmap-size 65536 \
-- /target/new_nginx/nginx_build/sbin/nginx
-- /root/target/nginx-fuzz/sbin/nginx
```

Здесь используются следующие опции фаззера:
Expand Down