libTriton  version 0.6 build 1375
Public Member Functions | Protected Attributes | List of all members
triton::engines::taint::TaintEngine Class Reference

The taint engine class. More...

#include <taintEngine.hpp>

Public Member Functions

TRITON_EXPORT TaintEngine (triton::engines::symbolic::SymbolicEngine *symbolicEngine, const triton::arch::CpuInterface &cpu)
 Constructor.
 
TRITON_EXPORT TaintEngine (const TaintEngine &other)
 Constructor by copy.
 
TRITON_EXPORT TaintEngineoperator= (const TaintEngine &other)
 Copies a TaintEngine.
 
TRITON_EXPORT void enable (bool flag)
 Enables or disables the taint engine.
 
TRITON_EXPORT const std::set< triton::uint64 > & getTaintedMemory (void) const
 Returns the tainted addresses.
 
TRITON_EXPORT std::set< const triton::arch::Register * > getTaintedRegisters (void) const
 Returns the tainted registers.
 
TRITON_EXPORT bool isEnabled (void) const
 Returns true if the taint engine is enabled.
 
TRITON_EXPORT bool isMemoryTainted (triton::uint64 addr, triton::uint32 size=1) const
 Returns true if the addr is tainted.
 
TRITON_EXPORT bool isMemoryTainted (const triton::arch::MemoryAccess &mem) const
 Returns true if the memory is tainted.
 
TRITON_EXPORT bool isRegisterTainted (const triton::arch::Register &reg) const
 Returns true if the register is tainted.
 
TRITON_EXPORT bool isTainted (const triton::arch::OperandWrapper &op) const
 Abstract taint verification. Returns true if the operand is tainted.
 
TRITON_EXPORT bool setTaint (const triton::arch::OperandWrapper &op, bool flag)
 Sets the flag (taint or untaint) to an abstract operand (Register or Memory).
 
TRITON_EXPORT bool setTaintMemory (const triton::arch::MemoryAccess &mem, bool flag)
 Sets the flag (taint or untaint) to a memory.
 
TRITON_EXPORT bool setTaintRegister (const triton::arch::Register &reg, bool flag)
 Sets the flag (taint or untaint) to a register.
 
TRITON_EXPORT bool taintMemory (triton::uint64 addr)
 Taints an address. Returns TAINTED if the address has been tainted correctly. Otherwise it returns the last defined state.
 
TRITON_EXPORT bool taintMemory (const triton::arch::MemoryAccess &mem)
 Taints a memory. Returns TAINTED if the memory has been tainted correctly. Otherwise it returns the last defined state.
 
TRITON_EXPORT bool taintRegister (const triton::arch::Register &reg)
 Taints a register. Returns TAINTED if the register has been tainted correctly. Otherwise it returns the last defined state.
 
TRITON_EXPORT bool untaintMemory (triton::uint64 addr)
 Untaints an address. Returns !TAINTED if the address has been untainted correctly. Otherwise it returns the last defined state.
 
TRITON_EXPORT bool untaintMemory (const triton::arch::MemoryAccess &mem)
 Untaints a memory. Returns !TAINTED if the memory has been untainted correctly. Otherwise it returns the last defined state.
 
TRITON_EXPORT bool untaintRegister (const triton::arch::Register &reg)
 Untaints a register. Returns !TAINTED if the register has been untainted correctly. Otherwise it returns the last defined state.
 
TRITON_EXPORT bool taintUnion (const triton::arch::OperandWrapper &op1, const triton::arch::OperandWrapper &op2)
 Abstract union tainting.
 
TRITON_EXPORT bool taintAssignment (const triton::arch::OperandWrapper &op1, const triton::arch::OperandWrapper &op2)
 Abstract assignment tainting.
 
TRITON_EXPORT bool taintUnionMemoryImmediate (const triton::arch::MemoryAccess &memDst)
 Taints MemoryImmediate with union. Returns true if the memDst is TAINTED.
 
TRITON_EXPORT bool taintUnionMemoryMemory (const triton::arch::MemoryAccess &memDst, const triton::arch::MemoryAccess &memSrc)
 Taints MemoryMemory with union. Returns true if the memDst or memSrc are TAINTED.
 
TRITON_EXPORT bool taintUnionMemoryRegister (const triton::arch::MemoryAccess &memDst, const triton::arch::Register &regSrc)
 Taints MemoryRegister with union. Returns true if the memDst or regSrc are TAINTED.
 
TRITON_EXPORT bool taintUnionRegisterImmediate (const triton::arch::Register &regDst)
 Taints RegisterImmediate with union. Returns true if the regDst is TAINTED.
 
TRITON_EXPORT bool taintUnionRegisterMemory (const triton::arch::Register &regDst, const triton::arch::MemoryAccess &memSrc)
 Taints RegisterMemory with union. Returns true if the regDst or memSrc are TAINTED.
 
TRITON_EXPORT bool taintUnionRegisterRegister (const triton::arch::Register &regDst, const triton::arch::Register &regSrc)
 Taints RegisterRegister with union. Returns true if the regDst or regSrc are TAINTED.
 
TRITON_EXPORT bool taintAssignmentMemoryImmediate (const triton::arch::MemoryAccess &memDst)
 Taints MemoryImmediate with assignment. Returns always false.
 
TRITON_EXPORT bool taintAssignmentMemoryMemory (const triton::arch::MemoryAccess &memDst, const triton::arch::MemoryAccess &memSrc)
 Taints MemoryMemory with assignment. Returns true if the memDst is tainted.
 
TRITON_EXPORT bool taintAssignmentMemoryRegister (const triton::arch::MemoryAccess &memDst, const triton::arch::Register &regSrc)
 Taints MemoryRegister with assignment. Returns true if the memDst is tainted.
 
TRITON_EXPORT bool taintAssignmentRegisterImmediate (const triton::arch::Register &regDst)
 Taints RegisterImmediate with assignment. Returns always false.
 
TRITON_EXPORT bool taintAssignmentRegisterMemory (const triton::arch::Register &regDst, const triton::arch::MemoryAccess &memSrc)
 Taints RegisterMemory with assignment. Returns true if the regDst is tainted.
 
TRITON_EXPORT bool taintAssignmentRegisterRegister (const triton::arch::Register &regDst, const triton::arch::Register &regSrc)
 Taints RegisterRegister with assignment. Returns true if the regDst is tainted.
 

Protected Attributes

bool enableFlag
 Defines if the taint engine is enabled or disabled.
 
std::set< triton::uint64taintedMemory
 The set of tainted addresses.
 
std::set< triton::arch::registers_etaintedRegisters
 The set of tainted registers. Currently it is an over approximation of the taint.
 

Detailed Description

The taint engine class.

Definition at line 52 of file taintEngine.hpp.


The documentation for this class was generated from the following files: