Optical Character Recognition (OCR) is the process of identifying and converting texts rendered in images using pixels to a more computer-friendly representation. The presented work aims to prove that the accuracy of the Tesseract 4.0 OCR engine can be further enhanced by employing convolution-based preprocessing using specific kernels. As Tesseract 4.0 has proven great performance when evaluated against a favorable input, its capability of properly detecting and identifying characters in more realistic, unfriendly images is questioned. The article proposes an adaptive image preprocessing step guided by a reinforcement learning model, which attempts to minimize the edit distance between the recognized text and the ground truth. It is shown that this approach can boost the character-level accuracy of Tesseract 4.0 from 0.134 to 0.616 (+359% relative change) and the F1 score from 0.163 to 0.729 (+347% relative change) on a dataset that is considered challenging by its authors.
By ensuring the Control Flow Integrity (CFI) of a program, one can successfully verify that each performed action is indeed part of a correct execution flow thus preventing unwanted behaviour caused by malicious inputs. Validating the Control Flow Graph (CFG) is usually done by instrumenting the code and enforcing a set of conditions which imply overhead and compiler support. In this paper, we investigate an alternative approach, based on controlled-channel: by invalidating certain pages and monitoring the Page Faults, we generate a CFG of faulting instructions which we use to detect unusual execution flows (e.g. buffer overflows, ROP) and discuss methods to estimate and mitigate the induced overhead. Using the page invalidation selection algorithms that we propose, we obtain an approximate slowdown factor of 3.43. This can be further reduced by doing a manual analysis of the involved binaries and sacrificing accuracy for speed.