EN
v2.1.7
WPE_TUTORIAL_V2 // 04_FILTER

Filters

Tutorial Rev · 2.1.8 beta

Filters are the heart of WPE x64: match a packet by rule and rewrite it before it is really sent or received. This chapter covers the matching algorithms, the cell marks, the five actions and chained execution in one go.

00 · Before you edit: which tool should do it

Four places in WPE can change what goes over the wire, and they do not overlap. Picking the wrong one is the number-one reason a filter appears not to work — trying to edit HTTP(S) with a filter, above all, never matches:

What you wantUseWhy not a filter
Change a few bytes in a TCP / UDP packetFilter · Replace— this is it
Stop a kind of packet being sent or received at allFilter · Intercept— this is it
Reply with a fixed payload on a matchFilter · Change, or a filter triggering a Robot— this is it
Change an HTTP / HTTPS response bodyMap Settings · Map Localfilters expose 12 packet-type switches and none covers HTTP(S) or WebSocket — those packets never enter matching
Redirect a request to another host or portMap Settings · Map Remotefilters change content, never the destination
Not capture a packet type at allHook Settingsfilters act after the packet exists; turning it off at the source costs less
Just tidy up a noisy listLeach Settingfilters really do change data; using one as a display filter will damage live traffic
Send packets on your own scheduleSend Listfilters are reactive — with no match, nothing happens
Quick start // building a filter that actually fires

Filters are the only mechanism in WPE that changes real network data. Here is the shortest path from nothing to a working one.

  1. Catch a sample first: find the packet in the list, right-click → Add to Filter List, and the search row is prefilled from its content.
  2. Name the filter and tick the packet types it applies to — Send / Recv and friends in Inject Mode, TCP / UDP request and response in Proxy Mode.
  3. Write the search row: keep only the bytes that identify the packet uniquely; empty cells are wildcards. Fewer bytes match more easily, more bytes match more precisely.
  4. Write the modify row: put the new values at the right offsets. For values that should increment or vary, use the Progression and Random marks.
  5. Pick an action: Replace to edit bytes, Intercept to drop the packet, Change to rebuild it whole (see section 06).
  6. Tick Enabled, save, then press Start. Check the filter log and Statistical Data to confirm it is running; matching rows change colour in the list.

01 · The life of a filter

01A packet's journey through the filter engine · eligibility first, then content matching, then the action.
a packet hits the hook or relay ① Eligibility checkenabled? type? socket / port / length? no skip this filter ② Content matchNormal: offsets · Advanced: sliding no match ③ Run the actionReplace / Change / Intercept / NoModify ×2 ④ Chained execution (optional)Send / Robot / another filter / store ⑤ Count +1, write the filter log the execution mode decides if matching continues next filter

02 · The Filter List

Toolbar: Enable ALL Disable ALL Reset counts. The Menu dropdown holds four items: add filter / import filter list / export all filters / clear all filters.

Right-click a row: move to top (Ctrl+) / up (Alt+) / down (Alt+) / to bottom (Ctrl+) / export / duplicate / delete. Double-click opens the filter editor.

// Order matters

In sequential execution mode, list order is match order. When a filter does not seem to fire, try moving it to the top first.

Three ways to create a filter

  1. Menu → add filter: creates an empty filter named Filter N.
  2. Right-click in the packet or proxy list → Add to Filter List: prefills the search row from that packet — much the easiest start.
  3. Select bytes in the hex editor → right-click → Add to Filter List: fills from just that selection, for when you have already found the signature.

03 · The Filter Edit window

02Filter Edit, Normal mode · parameters above, a two-row data grid below.
Filter Edit Filter name Lock the coin field 1 Mode Normal Advanced 2 Action Replace Change Intercept NoModify Display NoModify NoDisplay 3 Execute Send List ▾ Reply heartbeat ▾ 4 Packet type Inject ModeProxy Mode Send SendTo Recv RecvFrom WSASend WSASendTo WSARecv WSARecvFrom 5 Specify type Socket 5164;5252 Length 0-99;100 Port e.g. 80-89;1080 6 Advanced Packet head 01 00 0A Progression Continuous Step1 Carry over Digits2 7 Data grid Column 001002003004005006007008009010011012 Search 01 00 0A 4* FF … 1000 columns Modify 09 00 00 8 9 Progression Random Exclude (search row) right-click a cell to toggle these three marks; right-click again to clear them Save Exit
  1. Filter name: free text
  2. Mode: Normal for fixed offsets, Advanced for a sliding search — see section 04
  3. Action: one of five, see section 05
  4. Chained execution: on a match, additionally fire a send, a robot, another filter, or store the packet
  5. Packet type: the two tabs follow the current mode. At least one must be ticked or the filter can never fire
  6. Specify type: socket, length and port as preconditions — all combined with AND
  7. Advanced and Progression: the packet head, plus continuous progression, step, carry over and digits
  8. Search row (pale gold): the hex value in column i must equal byte i of the packet
  9. Modify row (gold): on a match, byte i is set to this value
// Column number is not the index

Column 001 is byte index 0. Subtract one whenever you count offsets.

04 · Normal versus Advanced

03How the two match · the same 4A 5B gives completely different results.
Packet content 01 00 4A 5B C3 7F 4A 5B D0 11 0123456789 Normal mode search row: col 003 = 4A, col 004 = 5B → checks indexes 2 and 3 only, 1 match (and only ever 1) match ignored Advanced mode search row: col 001 = 4A, col 002 = 5B (a relative sequence) → slides across the packet anchored on 4A, 2 matches match #1 match #2 "start from" picks the first match or every one ※ in Advanced mode with "from the matched position", modify columns are offsets from the anchor (-1000 to 999)
NormalAdvanced
Meaningmatch at fixed offsetsslide a signature across the packet
How many matchesevaluated oncecan match several times
Data gridtwo rows (search / modify), columns 0011000three grids: one search, two modify variants
Modify offsetsabsolute"from the packet start" is absolute; "from the matched position" is a relative offset, possibly negative
Use whenfields sit at fixed positionsfields move about, or headers vary in length

"Start from" (Advanced only)

OptionWhat is processedWhat the modify columns mean
From the packet startthe first match onlyabsolute indexes, starting at 0
From the matched positionevery matchoffsets relative to the anchor, which is 0 — negatives allowed

Wildcards

Search cells support nibble wildcards:

Written asMeansMask
4Aexactly the byte 0x4A0xFF
4*high nibble must be 4, low nibble anything0xF0
*Alow nibble must be A, high nibble anything0x0F
// Limitation

In Advanced mode only two-character forms like X* and *X count as partial wildcards. A full ** is not added to the match conditions at all — it is the same as leaving the cell empty.

05 · The three cell marks

Right-click a cell in the grid to toggle them; they are told apart by background colour:

MarkRowColourMeaning
Excludesearchpurpleinverted: the byte matches when it differs from the value
Progressionmodifydark redadds the step on every match, optionally carrying over
Randommodifybright bluewrites a random byte each time
// Common mistake

Ticking the Continuous box without also right-clicking the modify cell and choosing Enable Progression does nothing. The checkbox picks how the value accumulates; the cell shading is what decides which byte it applies to.

How progression is calculated

For each progression cell: new = old + step × (progression count + 1)

  • With continuous ticked the count rises by one per match, so the value keeps climbing. Without it, the same increment is applied every time
  • With carry over ticked, a byte overflowing past 0xFF carries into the preceding bytes, across at most digits of them

06 · The five actions

ActionWhat it doesRow colour
Replacerewrites the matched bytes from the modify row, applying progression and random cellsdark gold
Changediscards the original content and builds a new packet from the modify row, its length being the highest index plus onebright blue
Interceptthe packet is dropped — never sent, never receiveddark red
NoModify Displaycontent untouched, but the packet is guaranteed to reach the list and the counterslight green
NoModify NoDisplaycontent untouched and kept out of the list — for silencing frequent heartbeats
// Change discards data

A packet built by Change is as long as the highest index in the modify row plus one, and every cell you left empty becomes 0x00. To keep the original content, use Replace.

Chained execution

Ticking Execute reveals two dropdowns:

TypeTargetWhat happens on a match
Send Listone send itemruns that send immediately — auto-replies, canned sequences
Robot Listone robotstarts that robot, passing the current socket in as FilterSocket
Filter Listanother filterruns that filter as well — chained processing
Store the packetone warehousesaves the matched packet there — the rewritten version if it was changed

When the corresponding list is empty the entry is greyed out — create a send, robot or warehouse first, then come back.

07 · Filter execution mode

Switched under System Settings → filter execution mode:

ModeBehaviourUse when
Sequential (default)walks every filter top to bottom. Replace lets matching continue, so later filters see the already-edited data; Intercept / Change / Only Display / Not Display return immediatelyseveral filters need to stack on one packet
Prioritythe first match wins and matching stops therethe rules are mutually exclusive and speed matters

08 · Filter log and statistics

Every match outside Speed Mode writes a log line: time / filter name / action / match count / packet type / length. Read it under System Log → filter log, and export to Excel if needed.

The Statistical Data page shows progress bars for how much traffic filters touched and how the actions break down.

09 · Import, export and conversion

  • The native format is .fp — a filter list in XML, optionally encrypted
  • To convert from a legacy WPE .filt file, use the Extraction page and pick [ FILT filter file (.filt) ] → [ WPE64 filter file (.sp) ]. The converter parses 35 -separated fields and maps out the filter name, the head / socket / length conditions, Normal or Advanced mode, the Replace / Intercept / invisible actions, the search and modify content, progression and the rest

10 · Five worked examples

Example 1 · pin a field to a fixed value

Goal: in every Send packet, change the fifth byte — index 4 — from 01 to 09.

  1. Add a filter and name it "Lock field".
  2. Mode = Normal; action = Replace.
  3. Tick packet type Send for Inject Mode, or TCP request for Proxy Mode.
  4. Grid: put 01 in column 005 of the search row, and 09 in column 005 of the modify row.
  5. Save, then switch it on in the list.

Example 2 · silence flooding heartbeats

Goal: keep packets with head 01 00 03 and a length of exactly 8 out of the list.

  1. Add a filter with action = NoModify NoDisplay.
  2. Under Advanced, tick the packet head and enter 01 00 03.
  3. Under Specify type, tick length and enter 8.
  4. In the search row put 01 / 00 / 03 into columns 001 / 002 / 003.
// Do not skip that last step

Step 4 is not optional: a filter with an empty search row never matches. Setting only the packet head is not enough.

Example 3 · follow a signature (Advanced mode)

Goal: wherever 4A 5B appears, set the second byte after it to FF.

  1. Mode = Advanced; action = Replace; start from = the matched position.
  2. Search grid: 4A in 001, 5B in 002.
  3. Modify grid, relative: put FF at offset +3.
    The anchor 4A is offset 0, 5B is 1, the next byte is 2, and the one after that is 3.

Example 4 · an auto-incrementing counter

Goal: add one to byte 9 on every match, carrying across two bytes on overflow.

  1. Mode = Normal; action = Replace.
  2. In the progression group tick continuous with a step of 1, and tick carry over with 2 digits.
  3. Right-click column 009 of the modify row → enable progression; the cell turns dark red.

Example 5 · auto-reply on a match

  1. First create a send item and add the reply packet to its collection.
  2. Create the filter with action NoModify Display — you only want the trigger, not an edit.
  3. Tick Execute → choose Send List → pick the send item you just created.

11 · When a filter does not fire

// Work down this list

① Is the enable switch on in the Filter List?
② Is at least one packet type ticked, and does it match the packets you are after?
③ Did you tick socket / length / port under Specify type but enter the wrong value? These are AND conditions.
④ Is the search row empty? With nothing to search for, nothing ever matches.
⑤ In Normal mode, does an index run past the packet length? That counts as no match.
⑥ With execution mode set to Priority, an earlier filter that matched takes the packet — try moving this one to the top.
⑦ Trying to edit an HTTP / HTTPS / WebSocket packet? Filters do not apply to those types — use Map Settings instead.

// Editing the wrong bytes

Column 001 is index 0. In Advanced mode with "start from the matched position", the modify columns are offsets relative to the anchor, not absolute positions.