Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better scan strategy #1

Open
fireice-uk opened this issue Nov 30, 2019 · 3 comments
Open

Better scan strategy #1

fireice-uk opened this issue Nov 30, 2019 · 3 comments

Comments

@fireice-uk
Copy link

Hi! Something right up my alley.

The current scan strategy can be bypassed by rearranging FLOPS into blocks and setting mxcsr before and after those blocks, it won't change unless you hit on that block exactly.

You probably want to add a secondary detection method. Did you consider taking entropy measurement of xmm and regular regs?

@tevador
Copy link
Owner

tevador commented Nov 30, 2019

The current scan strategy can be bypassed by rearranging FLOPS into blocks and setting mxcsr before and after those blocks, it won't change unless you hit on that block exactly.

This could decrease the chance of detection, but I'd say the probability of hitting a non-default rounding mode would still be substantial even if you rearrange the FLOPs and keep the required MXCSR value only for the minimum time possible. The miner is running RandomX code around 90% of the time and roughly a third of that are floating point ops.

Also note that the programs contain branches and some FP operations have a dependency on integer registers (via a memory address), so you can't lump all FLOPs into one block. Additionally, ldmxcsr is a very slow instruction.

Did you consider taking entropy measurement of xmm and regular regs?

Yeah, that could be used as a secondary heuristic.

@fireice-uk
Copy link
Author

One other strategy I thought up while making coffee would be to check process memory mappings for contiguous 2.1GB high entropy areas.

@monero101
Copy link

  1. by emulating floating point operations using integer math and losing >95% of performance in the process
  2. by modifying the operating system

There is much easier way to bypass this detection, but can't disclose it at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants