Git Product home page Git Product logo

tsunami-security-scanner-callback-server's Introduction

Tsunami Callback Server


Tsunami Callback Server is a network service that Tsunami uses to help discover blind vulnerabilities such as server-side request forgery (SSRF) and blind RCE.


Tsunami callback server is a standalone application that can receive both http requests and DNS queries. A tsunami plugin can now check against the callback server to see if there are any out-of-bound interactions triggered from the detection stage.

Internally, to identify interactions per plugin, tsunami payload generator generates a unique id and returns the hash (SHA3 one-way hash by default) of the id with a callback server address for plugin to use and the callback server logs the hashed id from incoming requests. At the end of the detection, TcsClient queries the callback server about the original unhashed id. Callback server then applies the same hash on the id, and returns logged interactions if they exist.

Run Tsunami Scanner with Callback Server

Running Callback Server Locally

HTTP callback

Clone the repository and build the jar file.

git clone
cd tsunami-security-scanner-callback-server/
./gradlew shadowJar

Start callback server

  • With default settings:
java -cp "main/build/libs/tcs-main-[version]-cli.jar"
java \
    -cp "main/build/libs/tcs-main-0.0.1-SNAPSHOT-cli.jar" \ \

Configure Tsunami scan to use the local callback server by adding the followings to the Tsunami config file:

    callback_address: ""  # Running callback server locally
    callback_port: 8881            # Make sure to match with ones configured in tcs_config.yaml
    polling_uri: ""

Then run Tsunami following the instructions here using the modified tsunami.yaml file.

DNS Callback

โš ๏ธ Testing DNS callback locally requires modifying your iptables to reroute DNS queries to the port that callback DNS server is running at. You won't be able to resolve other domains once the iptables are updated.

Update the callback server config file to also spin up a DNS server:

  domain: cb.tsunami
    interaction_ttl_secs: 43200  # 12 hours
    cleanup_interval_secs: 3600  # 1 hour
    port: 8881
    worker_pool_size: 2
  dns:                           # Config for DNS server
    port: 8883                   # Port to reroute DNS query to
    worker_pool_size: 2
  port: 8880
  worker_pool_size: 2

Start the callback server as before, now you should see a DNS server turned up as well.

Create 2 new rules in your local iptables to reroute DNS queries to the port where your own DNS server is running at:

sudo iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination
sudo iptables -t nat -A OUTPUT -p tcp --dport 53 -j DNAT --to-destination

Now if you try to resolve the custom domain you set up with dig cb.tsunami, it should resolve to

Update callback_address field in the Tsunami config file to your custom domain to be used by tsunami payload generator.

Then run a Tsunami scan as before, now the payload generator will generate all the tsunami callback payloads using the configured domain, which will send DNS queries to the local DNS server you set up.

Don't forget to remove these iptables rules once you are done, otherwise you won't be able to resolve any other domain names properly.

sudo iptables -t nat -D OUTPUT -p udp --dport 53 -j DNAT --to-destination
sudo iptables -t nat -D OUTPUT -p tcp --dport 53 -j DNAT --to-destination


Read how to contribute to Tsunami.


Tsunami CallbackServer is released under the Apache 2.0 license.

Copyright 2022 Google LLC.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.


Tsunami is not an official Google product.

tsunami-security-scanner-callback-server's People


cpovirk avatar magl0 avatar maoning avatar


 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar


 avatar  avatar  avatar



tsunami-security-scanner-callback-server's Issues

Gradle Compilation Error

Hi. My current environment is Java 11 and Ubuntu 22.04. I can run Tsunami security scanner without any problem. However, when I try to build jar file from this repository to run callback server, I encounter with the following error:

ivar@ivar-virtual-machine:~/tsunami-security-scanner-callback-server$ ./gradlew shadowJar

> Task :tcs-storage:compileJava FAILED
/home/ivar/tsunami-security-scanner-callback-server/storage/src/main/java/com/google/tsunami/callbackserver/storage/ error: cannot find symbol
  symbol:   class Visibility
  location: @interface VisibleForTesting
/home/ivar/tsunami-security-scanner-callback-server/storage/src/main/java/com/google/tsunami/callbackserver/storage/ error: cannot find symbol
  @VisibleForTesting(productionVisibility = Visibility.PRIVATE)
  symbol:   method productionVisibility()
  location: @interface VisibleForTesting
/home/ivar/tsunami-security-scanner-callback-server/storage/src/main/java/com/google/tsunami/callbackserver/storage/ error: cannot find symbol
  @VisibleForTesting(productionVisibility = Visibility.PRIVATE)
  symbol:   variable Visibility
  location: class RedisInteractionStore
3 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tcs-storage:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.

9 actionable tasks: 6 executed, 3 up-to-date

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.