12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #ifndef FORWARDCHANNEL_H
- #define FORWARDCHANNEL_H
- #include "CovertChannel.h"
- /**
- * @class ForwardChannel
- *
- * A CovertChannel which forwards the traffic it captures.
- */
- class ForwardChannel : public CovertChannel {
- public:
- /**
- * Sets up a CovertChannel.
- *
- * Creates a CovertChannel, sets the network interfaces for sniffing and sending and sets the filter.
- *
- * @param innerInterface name of the interface of the inner network
- * @param outerInterface name of the interface of the outer network
- * @param filter pcap filter string which will be set for the channel sniffers and negated for the forward sniffers
- */
- ForwardChannel(const std::string &innerInterface, const std::string &outerInterface);
- /**
- * Destroys the CovertChannel.
- */
- virtual ~ForwardChannel();
- protected:
- /**
- * Handler for sniffed packets filterd to forward from the outer network.
- *
- * Handles incoming packets and forwards them.
- *
- * @param pdu sniffed packet
- *
- * @return false = stop loop | true = continue loop
- */
- virtual bool handleChannelFromOuter(Tins::PDU &pdu);
- /**
- * Handler for sniffed packets filterd to forward from the inner network.
- *
- * Handles incoming packets and forwards them.
- *
- * @param pdu sniffed packet
- *
- * @return false = stop loop | true = continue loop
- */
- virtual bool handleChannelFromInner(Tins::PDU &pdu);
- /**
- * Handler for sniffed packets filterd to use as channel from the outer network.
- *
- * Handles incoming packets and redirets them.
- *
- * @param pdu sniffed packet
- *
- * @return false = stop loop | true = continue loop
- */
- virtual bool handlePartnerFromOuter(Tins::PDU &pdu);
- };
- #endif
|