Wiki do Laboratório MARTIN → FLAME installation
 
 

FLAME installation

Last modified on Monday, March 4th 2013 at 6:47 PM.

Português

The FLAME platform comprises 3 components (more about the platform here):

To use the platform, an XMPP/Jabber server and only one valid user are needed. We made the following account available for tests:

Download a package with all components (under email request to martinlab@lncc.br, indicating the complete name and institution of the requester).

Below are the specific steps for installation and execution of each component of the FLAME platform.

OBS: the packages mentioned in this documentation are for Ubuntu 9.04 or higher. We have also tested them on Debian and Fedora (and, for the flame-console component, on Mac OS X as well), but the system package names (and the package management tools themselves!) may differ.

flame-manager installation

To compile flame-manager the following packages need to be installed: libpqxx-dev and libgloox-dev.

sudo aptitude install libgloox-dev libpqxx-dev

Go to the flame-manager directory and compile everything:

aclocal
./autogen.sh
autoconf
automake
./configure
make

Usually, you'd need to call the first 4 commands only once. If you have problems with ./configure on package libgloox-dev, see section "Troubleshooting" below.

After compilation, the executable will be ./manager. Before running, edit the configuration file conf/flame.conf, placing an XMPP server and a user to be used by the platform (such configuration must be equal for all the other components). The database connection info must also be set in this file.

OBS: the current version of flame-manager was only tested using PostgreSQL 8.3 as the central repository. To create the database structure, copy the SQL script conf/db-schema.sql that comes within the installation package to a host with a PostgreSQL running, and execute the following command:

sudo -u postgres psql -f db-schema.sql

To run flame-manager, execute the following command:

./manager -c conf/flame.conf

flame-agent installation

To compile flame-agent the following packages need to be installed: lua5.1, libcap-dev, and libgloox-dev.

sudo aptitude install libgloox-dev lua5.1 libpcap-dev

Go to the flame-agent directory and compile everything:

aclocal
./autogen.sh
autoconf
automake
./configure
make

Usually, you'd need to call the first 4 commands only once. If you have problems with ./configure on packages libgloox-dev or lua5.1, see section "Troubleshooting" below.

After compilation, the executable will be ./agent. Before running, edit the configuration file conf/flame.conf, placing an XMPP server and a user to be used by the platform (such configuration must be equal for all the other components).

OBS: one flame-manager must be running on the desired XMPP server, or the agent execution will be terminated and an error informed.

To run flame-agent, execute the following command (the user must have admin privileges):

sudo -u <admin_user> ./agent -c conf/flame.conf

flame-console installation

In order to compile flame-console, first you need to install some dependencies. Here we will describe the steps to install the flame-console. After following all the steps, you should be able to use the console.

The flame-console package is available upon request and instructions on how to request it can be found in the main page of the flame package.

Upon unpacking the received flame-console package, a flame-console folder is created. Please follow the below steps in order to compile the flame-console:

  1. sudo apt-get install gcc g++ autoconf automake libtool libreadline-dev libncurses-dev
  2. Download the package gloox-0.9.9.12, and extract it into flame-console folder.
  3. Download the package lua-5.1.4, and extract it into flame-console folder.
  4. Go to the flame-console folder and perform the following sequence of commands
  5. cd gloox-0.9.9.12/
  6. chmod +x configure
  7. ./configure –prefix=/usr
  8. make
  9. sudo make install
  10. cd ../lua-5.1.4/
  11. sudo make linux install
  12. cd ../
  13. aclocal
  14. chmod +x autogen.sh
  15. ./autogen.sh
  16. autoconf
  17. automake
  18. chmod +x configure
  19. ./configure
  20. make
  21. Edit the configuration file conf/flame.conf to specify a XMPP server and a user to be used by the platform (such configuration must be the same for all the other components).

The executable file is named ./console

To run flame-console, the user may provide as command-line parameters:

--agents,      -a <string> Lua chunk returning a string or table with agent(s) address(es)
--agents-file, -f <string> Lua file returning a string or table with agent(s) address(es)
--config,      -c <file>   Configuration file
--exclusive,   -e          Exclusive mode
--script,      -s <file>   Script Lua file

OBS1: one flame-manager must be running on the desired XMPP server, or the console execution will be terminated and an error informed.

OBS2: with the '-e' option, the informed agent will run in "exclusive" mode, being disconnected during the test execution and reconnected after the end of the script execution, to avoid undesirable effects on the measurement results.

Troubleshooting

Autotools may have some trouble finding some packages, even autotools itself!!! Please find bellow some workarounds.

autotools workaround:

Depending on your system setup, automake and autoconf may be not available. In this case, the following packages need to be installed: autoconf and libtool.

sudo aptitude install autoconf libtool

m4 workaround:

If you have problems running ./autogen.sh because a m4 directory is missing, simply mkdir it!

libgloox-dev workaround:

Uninstall it from aptitude, then download the package and install it:

./configure --prefix=/usr
make
sudo make install

lua5.1 workaround:

Uninstall it from aptitude, then download the package and install it:

sudo make linux install

Usage

Having flame-manager running, run flame-agent on each host that is going to execute scripts or take part in a cooperative test. Finally, run flame-console informing which host(s) to run the scripts that will trigger measurement experiments: the '-a' option allows the user to pass a Lua chunk returning an agent identifier (a Lua string) or a set of agent identifiers (a Lua table); the '-f' option allows the user to pass a Lua file returning that. A script prototyping a measurement tool may also be sent to the informed agent(s) using the '-s' option. A command prompt (flame>>) will be opened to the user, allowing him to execute commands on the informed agent(s).

Examples are provided below (which can be run directly from the flame-console directory):

Eg. 1: To run script flamePing10() without parameters on agent 10.0.0.1

./console -a "return '10.0.0.1'" -c conf/flame.conf -s examples/test_sendICMPTW.lua
...
flame>> flamePing10()

Eg. 2: To run script flamePig10() with parameters on agents 10.0.0.1 and 10.0.0.2

./console -a "return {'10.0.0.1','10.0.0.2'}" -c conf/flame.conf -s examples/test_sendICMPTW2.lua
...
flame>> flamePing10('www.google.com')

Eg. 3: To run script flamePig10() with parameters on agents 10.0.0.1 and 10.0.0.2 (file agents_list.lua has the same Lua code as the '-a' option in Eg. 1)

./console -f examples/agents_list.lua -c conf/flame.conf -s examples/test_sendICMPTW2.lua
...
flame>> flamePing10('www.google.com')

Some implementation examples of tools (like ping and traceroute) can be downloaded here.

IMPORTANT NOTE

The FLAME platform described here has NOTHING TO DO with the FLAME malware discovered in 2012. Our FLAME platform is for the rapid prototyping of active measurement tools, as described in the platform website.

We've become aware of some supposedly "news" published in this link in 2012 about a malware called FLAME, that has been associated in a related post at the aforementioned website with the FLAME platform developed by our MARTIN group at LNCC.

In light of the above, we'd like to make it very much clear that:

As a final remark, we emphasize that all this matter boils down to a unfortunate coincidence of a malware having the same name as the acronym we’ve been using since at least 2010.

Hoping to have clarified the matter, our best wishes.

MARTIN Lab team.

END OF NOTE