capa icon indicating copy to clipboard operation
capa copied to clipboard

rich.errors.MarkupError: closing tag '[/\xe1\xa5\xf9\x96_/x\xecJ@]' at position 668 doesn't match any open tag

Open mike-hunhoff opened this issue 6 months ago • 4 comments

trigger: https://www.virustotal.com/gui/file/fdbbffd916f8dec89890edd946f6bde702beb08d9b34f3c87309821dbf9b3a24/behavior

mike-hunhoff avatar Jun 23 '25 20:06 mike-hunhoff

Traceback (most recent call last):
  File "main.py", line 1149, in <module>
  File "main.py", line 1054, in main
  File "render/vverbose.py", line 540, in render
  File "render/vverbose.py", line 533, in render_vverbose
  File "render/vverbose.py", line 508, in render_rules
  File "render/verbose.py", line 163, in render_call
  File "render/utils.py", line 37, in mute
  File "rich/text.py", line 287, in from_markup
  File "rich/markup.py", line 167, in render
rich.errors.MarkupError: closing tag '[/\xe1\xa5\xf9\x96_/x\xecJ@]' at position 668 doesn't match any open tag
[PYI-790874:ERROR] Failed to execute script 'main' due to unhandled exception!

mike-hunhoff avatar Jun 23 '25 20:06 mike-hunhoff

i believe this comes from us rendering strings from the sample that contain markup that looks like what rich supports ([]-delimited).

perhaps more seriously, we should treat the data coming from the sample as untrusted, and not try to parse it for markup. otherwise, a sample could embed a clickable link that might trick the analyst into visiting an unexpected site or something. i dont know if code exec is possible (i hope not).

williballenthin avatar Jun 24 '25 07:06 williballenthin

@williballenthin @mike-hunhoff can you confirm if this issue is still there and how to reproduce it ? I do not see capa rendering any string .

Jinsakai-25 avatar Sep 20 '25 14:09 Jinsakai-25

what output do you get for the sample?

mr-tz avatar Oct 17 '25 09:10 mr-tz