Constraint-Based Software Diversification for Efficient Mitigation of
Code-Reuse Attacks
- URL: http://arxiv.org/abs/2007.08955v1
- Date: Fri, 17 Jul 2020 13:01:44 GMT
- Title: Constraint-Based Software Diversification for Efficient Mitigation of
Code-Reuse Attacks
- Abstract summary: This paper introduces Diversity by Construction (DivCon), a constraint-based compiler approach to software diversification.
A key enabler is the use of Large Neighborhood Search (LNS) to generate highly diverse assembly code efficiently.
Experiments show that DivCon is able to mitigate code-reuse attacks effectively while delivering near-optimal code.
- Score: 3.105247002588354
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Modern software deployment process produces software that is uniform, and
hence vulnerable to large-scale code-reuse attacks. Compiler-based
diversification improves the resilience and security of software systems by
automatically generating different assembly code versions of a given program.
Existing techniques are efficient but do not have a precise control over the
quality of the generated code variants.
This paper introduces Diversity by Construction (DivCon), a constraint-based
compiler approach to software diversification. Unlike previous approaches,
DivCon allows users to control and adjust the conflicting goals of diversity
and code quality. A key enabler is the use of Large Neighborhood Search (LNS)
to generate highly diverse assembly code efficiently.
Experiments using two popular compiler benchmark suites confirm that there is
a trade-off between quality of each assembly code version and diversity of the
entire pool of versions. Our results show that DivCon allows users to trade
between these two properties by generating diverse assembly code for a range of
quality bounds. In particular, the experiments show that DivCon is able to
mitigate code-reuse attacks effectively while delivering near-optimal code (<
10% optimality gap).
For constraint programming researchers and practitioners, this paper
demonstrates that LNS is a valuable technique for finding diverse solutions.
For security researchers and software engineers, DivCon extends the scope of
compiler-based diversification to performance-critical and resource-constrained
applications.
Related papers
- MATRIX: Multi-Layer Code Watermarking via Dual-Channel Constrained Parity-Check Encoding [11.231440860032388]
Existing code watermarking approaches suffer from two fundamental limitations.<n>We present MATRIX, a novel code watermarking framework that formulates watermark encoding as solving constrained parity-check matrix equations.
arXiv Detail & Related papers (2026-04-17T12:25:41Z) - Secure Code Generation via Online Reinforcement Learning with Vulnerability Reward Model [60.60587869092729]
Large language models (LLMs) are increasingly used in software development, yet their tendency to generate insecure code remains a major barrier to real-world deployment.<n>We propose SecCoderX, an online reinforcement learning framework for functionality-preserving secure code generation.
arXiv Detail & Related papers (2026-02-07T07:42:07Z) - Training Language Models to Generate Quality Code with Program Analysis Feedback [66.0854002147103]
Code generation with large language models (LLMs) is increasingly adopted in production but fails to ensure code quality.<n>We propose REAL, a reinforcement learning framework that incentivizes LLMs to generate production-quality code.
arXiv Detail & Related papers (2025-05-28T17:57:47Z) - TFHE-Coder: Evaluating LLM-agentic Fully Homomorphic Encryption Code Generation [10.597643264309415]
Homomorphic Encryption over the torus (TFHE) enables encrypted computation on data without decryption.
Despite its potential in privacy preserving machine learning, secure multi party computation, private blockchain transactions, and secure medical diagnostics, its adoption remains limited due to cryptographic complexity and usability challenges.
This work establishes the first benchmark for TFHE code generation, demonstrating how LLMs, when augmented with domain-specific feedback, can bridge the expertise gap in FHE code generation.
arXiv Detail & Related papers (2025-03-15T17:57:44Z) - CodeDPO: Aligning Code Models with Self Generated and Verified Source Code [52.70310361822519]
We propose CodeDPO, a framework that integrates preference learning into code generation to improve two key code preference factors: code correctness and efficiency.
CodeDPO employs a novel dataset construction method, utilizing a self-generation-and-validation mechanism that simultaneously generates and evaluates code and test cases.
arXiv Detail & Related papers (2024-10-08T01:36:15Z) - HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training Data [60.75578581719921]
Large language models (LLMs) have shown great potential for automatic code generation.
Recent studies highlight that many LLM-generated code contains serious security vulnerabilities.
We introduce HexaCoder, a novel approach to enhance the ability of LLMs to generate secure codes.
arXiv Detail & Related papers (2024-09-10T12:01:43Z) - CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Code [56.019447113206006]
Large Language Models (LLMs) have achieved remarkable progress in code generation.
CodeIP is a novel multi-bit watermarking technique that embeds additional information to preserve provenance details.
Experiments conducted on a real-world dataset across five programming languages demonstrate the effectiveness of CodeIP.
arXiv Detail & Related papers (2024-04-24T04:25:04Z) - StepCoder: Improve Code Generation with Reinforcement Learning from
Compiler Feedback [58.20547418182074]
We introduce StepCoder, a novel framework for code generation, consisting of two main components.
CCCS addresses the exploration challenge by breaking the long sequences code generation task into a Curriculum of Code Completion Subtasks.
FGO only optimize the model by masking the unexecuted code segments to provide Fine-Grained Optimization.
Our method improves the ability to explore the output space and outperforms state-of-the-art approaches in corresponding benchmarks.
arXiv Detail & Related papers (2024-02-02T13:14:31Z) - Pluvio: Assembly Clone Search for Out-of-domain Architectures and
Libraries through Transfer Learning and Conditional Variational Information
Bottleneck [6.230859543111394]
Assembly clone search has been effective in identifying vulnerable code resulting from reuse in released executables.
Recent studies on assembly clone search demonstrate a trend towards using machine learning-based methods to match assembly code variants.
We propose incorporating human common knowledge through large-scale pre-trained natural language models, in the form of transfer learning, into current learning-based approaches for assembly clone search.
arXiv Detail & Related papers (2023-07-20T06:55:37Z) - CONCORD: Clone-aware Contrastive Learning for Source Code [64.51161487524436]
Self-supervised pre-training has gained traction for learning generic code representations valuable for many downstream SE tasks.
We argue that it is also essential to factor in how developers code day-to-day for general-purpose representation learning.
In particular, we propose CONCORD, a self-supervised, contrastive learning strategy to place benign clones closer in the representation space while moving deviants further apart.
arXiv Detail & Related papers (2023-06-05T20:39:08Z) - CodeT5+: Open Code Large Language Models for Code Understanding and
Generation [72.1638273937025]
Large language models (LLMs) pretrained on vast source code have achieved prominent progress in code intelligence.
CodeT5+ is a family of encoder-decoder LLMs for code in which component modules can be flexibly combined to suit a wide range of downstream code tasks.
We extensively evaluate CodeT5+ on over 20 code-related benchmarks in different settings, including zero-shot, finetuning, and instruction-tuning.
arXiv Detail & Related papers (2023-05-13T14:23:07Z) - Execution-based Code Generation using Deep Reinforcement Learning [8.085533911328577]
PPOCoder is a new framework for code generation that combines pre-trained PL models with Proximal Policy Optimization.
PPOCoder seamlessly integrates external code-specific knowledge into the model optimization process.
It's important to note that PPOCoder is a task-agnostic and model-agnostic framework that can be used across different code generation tasks and PLs.
arXiv Detail & Related papers (2023-01-31T18:02:26Z) - String-based Molecule Generation via Multi-decoder VAE [56.465033997245776]
We investigate the problem of string-based molecular generation via variational autoencoders (VAEs)
We propose a simple, yet effective idea to improve the performance of VAE for the task.
In our experiments, the proposed VAE model particularly performs well for generating a sample from out-of-domain distribution.
arXiv Detail & Related papers (2022-08-23T03:56:30Z) - Securing Optimized Code Against Power Side Channels [1.589424114251205]
Security engineers often sacrifice code efficiency by turning off compiler optimization and/or performing local, post-compilation transformations.
This paper proposes SecConCG, a constraint-based compiler approach that generates optimized yet secure code.
arXiv Detail & Related papers (2022-07-06T12:06:28Z) - Constraint-based Diversification of JOP Gadgets [4.836505845931204]
This paper introduces Diversity by Construction (DivCon), a constraint-based approach to software diversification.
A key enabler is the use of Large Neighborhood Search (LNS) to generate highly diverse code efficiently.
For security researchers and software engineers, DivCon extends the scope of compiler-based diversification to performance-critical and resource-constrained applications.
arXiv Detail & Related papers (2021-11-18T20:13:07Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.