Yating Liu, Xing Su, Hao Wu, Sijin Li ยท 7 authors
Adversarial smart contracts, mostly on EVM-compatible chains like Ethereum and BSC, are deployed as EVM bytecode to exploit vulnerable smart contracts for financial gain. Detecting such malicious contracts at the time of deployment is an important proactive strategy to prevent losses from victim contracts. It offers a better cost-benefit ratio than detecting vulnerabilities on diverse potential victims. However, existing works are not generic with limited detection types and effectiveness due to imbalanced samples, while the emerging LLM technologies, which show their potential in generalization, have two key problems impeding its application in this task: hard digestion of compiled-code inputs, especially those with task-specific logic, and hard assessment of LLM's certainty in its binary (yes-or-no) answers. Therefore, we propose a generic adversarial smart contracts detection framework FinDet, which leverages LLM with two enhancements addressing the above two problems. FinDet takes as input only the EVM bytecode contracts and identifies adversarial ones among them with high balanced accuracy. The first enhancement extracts concise semantic intentions and high-level behavioral logic from the low-level bytecode inputs, unleashing the LLM reasoning capability restricted by the task input. The second enhancement probes and measures the LLM uncertainty to its multi-round answering to the same query, improving the LLM answering robustness for binary classifications required by the task output. Our comprehensive evaluation shows that FinDet achieves a BAC of 0.9374 and a TPR of 0.9231, significantly outperforming existing baselines. It remains robust under challenging conditions including unseen attack patterns, low-data settings, and feature obfuscation. FinDet detects all 5 public and 20+ unreported adversarial contracts in a 10-day real-world test, confirmed manually.
To address the absence of process-level verifiability in federated learning, a verifiable architecture, zero-knowledge proof-verified and blockchain-audited federated learning (zk-BcFed), is proposed by integrating zero-knowledge proofs with blockchain. For each local model update, a multi-constraint zero-knowledge proof is generated by the client, and verified cryptographic evidence is recorded on-chain, enabling formal verification of local training without disclosure of private data. Across benchmark datasets including SVHN, FashionMNIST, and CIFAR10, among others, enabling zero-knowledge proofs is observed to produce a negligible change in accuracy while substantially improving robustness under model poisoning attacks. Collectively, zk-BcFed safeguards the computational integrity and correctness of federated learning and provides a reliable verifiability mechanism with modest overhead.
With the widespread application of smart contracts and the expansion of asset management scale, various new attacks continue to emerge, and a method that can adapt to new vulnerabilities more quickly is urgently needed. Although deep learning methods have shown superior performance in vulnerability detection, their dependence on a large number of labeled samples limits their applicability in new vulnerability scenarios. Therefore, this article introduces a dual adversarial domain adaptation (DADA) approach. This approach consists of two generators and two discriminators. First, the source generator is pretrained with extensive labeled known vulnerability samples in the source domain to extract discriminative features, and its parameters are shared with the target generator. Subsequently, the features of the source and target domain samples are input into the source discriminator, and the target generator is guided to learn domain-invariant features through adversarial training; at the same time, the target domain discriminator is introduced to further weaken its dependence on the distribution of source domain features, thereby improving its adaptability to new vulnerabilities. We conducted experimental evaluations on public datasets, and the results show that our proposed method outperforms six mainstream deep learning-based detection methods. We applied domain adaptation methods to smart contract vulnerability detection for the first time, providing a reference for small sample learning in this field in the future.
Mahendran Chinnaiah, A. Kumar Chandra Gupta, Saurabh Srivastava, Ashok Ghimire
At a time when data privacy laws and cyber-attacks are on the rise, Zero-Knowledge Proofs (ZKPs) and Artificial Intelligence (AI) hold the potential of a transformational paradigm of safe (privacy-preserving) machine learning (ML) inferences. In this paper, we present a new architecture that facilitates Zero-Knowledge AI, in which sensitive data inputs and internal model parameters remain unknown during the model inference procedure across distributed ecosystems. The proposed framework can help preserve privacy standards like GDPR and HIPAA, inference accuracies, and scalability of these inferences by utilising mechanisms to observe cryptographic zero-knowledge protocols, as well as federated learning protocols. We describe the construction of ZK-friendly models to apply to neural inference pipelines, efficient zk-SNARK-based model validation, decentralized trusting schemes, and privacy-respecting model auditing. Testing over a variety of healthcare and financial datasets indicates that our Zero-Knowledge AI solution results in high privacy guarantees with limited throughput losses. The work provides a strong basis on how to implement trusted and privacy-first AI systems in the real life and distributed operating environment.
Split Learning (SL) is a distributed learning approach that enables resource-constrained clients to collaboratively train deep neural networks (DNNs) by offloading most layers to a central server while keeping in- and output layers on the client-side. This setup enables SL to leverage server computation capacities without sharing data, making it highly effective in resource-constrained environments dealing with sensitive data. However, the distributed nature enables malicious clients to manipulate the training process. By sending poisoned intermediate gradients, they can inject backdoors into the shared DNN. Existing defenses are limited by often focusing on server-side protection and introducing additional overhead for the server. A significant challenge for client-side defenses is enforcing malicious clients to correctly execute the defense algorithm. We present ZORRO, a private, verifiable, and robust SL defense scheme. Through our novel design and application of interactive zero-knowledge proofs (ZKPs), clients prove their correct execution of a client-located defense algorithm, resulting in proofs of computational integrity attesting to the benign nature of locally trained DNN portions. Leveraging the frequency representation of model partitions enables ZORRO to conduct an in-depth inspection of the locally trained models in an untrusted environment, ensuring that each client forwards a benign checkpoint to its succeeding client. In our extensive evaluation, covering different model architectures as well as various attack strategies and data scenarios, we show ZORRO's effectiveness, as it reduces the attack success rate to less than 6\% while causing even for models storing \numprint{1000000} parameters on the client-side an overhead of less than 10 seconds.
Nan Wang, Nan Wu, Xiangyu Hui, Jiafan Wang ยท 5 authors
As the demand for exercising the "right to be forgotten" grows, the need for verifiable machine unlearning has become increasingly evident to ensure both transparency and accountability. We present {\em zkUnlearner}, the first zero-knowledge framework for verifiable machine unlearning, specifically designed to support {\em multi-granularity} and {\em forgery-resistance}. First, we propose a general computational model that employs a {\em bit-masking} technique to enable the {\em selectivity} of existing zero-knowledge proofs of training for gradient descent algorithms. This innovation enables not only traditional {\em sample-level} unlearning but also more advanced {\em feature-level} and {\em class-level} unlearning. Our model can be translated to arithmetic circuits, ensuring compatibility with a broad range of zero-knowledge proof systems. Furthermore, our approach overcomes key limitations of existing methods in both efficiency and privacy. Second, forging attacks present a serious threat to the reliability of unlearning. Specifically, in Stochastic Gradient Descent optimization, gradients from unlearned data, or from minibatches containing it, can be forged using alternative data samples or minibatches that exclude it. We propose the first effective strategies to resist state-of-the-art forging attacks. Finally, we benchmark a zkSNARK-based instantiation of our framework and perform comprehensive performance evaluations to validate its practicality.
Decentralized Finance (DeFi) attacks have resulted in significant losses, often orchestrated through Adversarial Exploiter Contracts (AECs) that exploit vulnerabilities in victim smart contracts. To proactively identify such threats, this paper targets the explainable detection of AECs. Existing detection methods struggle to capture semantic dependencies and lack interpretability, limiting their effectiveness and leaving critical knowledge gaps in AEC analysis. To address these challenges, we introduce SEASONED, an effective, self-explanatory, and robust framework for AEC detection. SEASONED extracts semantic information from contract bytecode to construct a semantic relation graph (SRG), and employs a self-counterfactual explainable detector (SCFED) to classify SRGs and generate explanations that highlight the core attack logic. SCFED further enhances robustness, generalizability, and data efficiency by extracting representative information from these explanations. Both theoretical analysis and experimental results demonstrate the effectiveness of SEASONED, which showcases outstanding detection performance, robustness, generalizability, and data efficiency learning ability. To support further research, we also release a new dataset of 359 AECs.
Moosa Uday Kumar, P. R. Pooja, Abhishek Dixit, M. A. Jabbar
The security of smart contracts is critical to the integrity of decentralized systems. Unlike traditional software, their immutability makes them particularly susceptible to zero-day vulnerabilities unseen flaws that can lead to catastrophic financial losses once exploited. Traditional detection methods, which rely on predefined attack patterns, are fundamentally incapable of addressing such unknown threats. This paper introduces a novel deep learning framework designed to proactively detect both known and previously unobserved zero-day vulnerabilities in Ethereum smart contracts. The approach employs a dual-path architecture that combines CodeBERT for deep semantic feature extraction with two parallel detection modules: a Graph Neural Network (GNN) for classifying known threats and a dedicated Autoencoder for unsupervised anomaly detection. This dual-path system leverages the strengths of both supervised and unsupervised learning. The GNN effectively classifies known attack vectors, while the Autoencoder identifies latent anomalies by flagging contracts with high reconstruction errors, a key indicator of unseen vulnerabilities. The framework was trained and validated on a balanced subset of the Malicious Smart Contract Detection dataset. The GNN demonstrated a high classification accuracy for known vulnerabilities, and the Autoencoder successfully identified anomalous contracts that deviated from learned patterns. This dual-pronged methodology represents a significant step forward in bolstering blockchain security by providing a robust, data-driven defense against the evolving landscape of smart contract vulnerabilities.
With the increasing need to train AI models on sensitive healthcare data, Federated Learning (FL) has emerged as a decentralized approach that avoids raw data sharing. However, existing methods such as DP-FL and zkFL still suffer from high privacy leakage, computational overhead, and scalability challenges. To overcome these limitations, this study introduces ZK-FedTransformer++, a novel privacy-preserving FL framework. It integrates lightweight TinyViT transformers, zk-SNARKs for verifiable training, differential privacy for statistical protection, and heuristic client selection for robust participation The approach provides secure model updates via cryptographic proof circuits and noise-perturbed gradients. Experiments based on the RSNA Breast Cancer Detection dataset achieve 91.2% accuracy and 35% less privacy leakage. Tools utilized include PyTorch, zk-SNARK libraries, and privacy accounting protocols. In summary, ZK- FedTransformer++ is an effective privacy enhancement, accuracy improvement, and scalability solution that is a feasible solution for secure, decentralized AI applications in real-world healthcare and IoT settings.
Machine learning as a service (MLaaS) has emerged as a prominent computing paradigm where users send sensitive data to cloud servers that subsequently return computed results. In MLaaS, ensuring the correctness of these results poses a significant challenge. While zero-knowledge proof (ZKP) presents a potential solution, they often come with substantial memory overhead. Moreover, there is insufficient attention given to the privacy risks associated with untrustworthy servers, which could jeopardize users' sensitive information. In this paper, we introduce$\text{Vp}^{3}\text{CNN}$, a three-party verifiable privacy-preserving convolutional neural network (CNN) inference scheme. In$\text{Vp}^{3}\text{CNN}$, users verify the correctness of CNN inference through a lightweight ZKP protocol grounded in vector oblivious linear evaluation. This protocol is designed to ensure that servers incur minimal memory overhead while maintaining the integrity of the verification process. Based on the optimization of the convolutional relation, the scheme reduces the computational cost associated with the verification process of the convolution operations. In addition,$\text{Vp}^{3}\text{CNN}$employs two non-colluded servers to protect user data privacy via secret sharing schemes. We implement our scheme in C++ and evaluate its performance using the MNIST and CIFAR-10 datasets. Experimental results demonstrate that, compared to existing methods,$\text{Vp}^{3}\text{CNN}$achieves a speedup of 4โ5 times in convolution verification while maintaining nearly consistent communication overhead. Importantly,$\text{Vp}^{3}\text{CNN}$does not compromise the accuracy of CNN inference, achieving an accuracy of 97.8% on the MNIST dataset.
Damla Sarฤฑรงelik, Mohaned Chraiti, Albert Lรฉvi, รzgรผr Erรงetin
The Open Radio Access Network (O-RAN) paradigm fosters multi-vendor interoperability, allowing modules from different vendors to cooperatively handle network functions, such as temporary data processing or sensor data collection for network operations optimization. However, this integration agility introduces the risk of selecting suboptimal or adversarial modules, leading to moral hazard. Traditional Moral Hazard testing approaches typically rely on a benchmarking data set in addition to historical performance score. However, they deemed impractical, as vendor-supplied modules may not reveal their outputs before deployment, and the network may lack direct access to reference results for validation. This challenge is further compounded by the dynamic nature of network elements and AI-driven models, whose performance can degrade over time due to malicious tampering, obsolescence, or device deterioration, making historical quality assessments ineffective. In this paper, we address the challenge of identifying legitimate vendor-supplied modules among adversarial ones, with respect to a given network functionality/operation, in the absence of benchmarks. We propose a benchmark-free test framework that detects and eliminates adversarial modules using a methodology inspired by the WereWolf game, combined with zero-knowledge proof techniques. Monte Carlo simulations demonstrate that our approach effectively removes adversarial entities while preserving the privacy of legitimate modules.
Fine-tuning large language models (LLMs) is crucial for adapting them to specific tasks, yet it remains computationally demanding and raises concerns about correctness and privacy, particularly in untrusted environments. Although parameter-efficient methods like Low-Rank Adaptation (LoRA) significantly reduce resource requirements, ensuring the security and verifiability of fine-tuning under zero-knowledge constraints remains an unresolved challenge. To address this, we introduce VeriLoRA, the first framework to integrate LoRA fine-tuning with zero-knowledge proofs (ZKPs), achieving provable security and correctness. VeriLoRA employs advanced cryptographic techniques -- such as lookup arguments, sumcheck protocols, and polynomial commitments -- to verify both arithmetic and non-arithmetic operations in Transformer-based architectures. The framework provides end-to-end verifiability for forward propagation, backward propagation, and parameter updates during LoRA fine-tuning, while safeguarding the privacy of model parameters and training data. Leveraging GPU-based implementations, VeriLoRA demonstrates practicality and efficiency through experimental validation on open-source LLMs like LLaMA, scaling up to 13 billion parameters. By combining parameter-efficient fine-tuning with ZKPs, VeriLoRA bridges a critical gap, enabling secure and trustworthy deployment of LLMs in sensitive or untrusted environments.
Youwei Huang, Jianwen Li, Bin Hu, Sen Fang ยท 6 authors
Malicious developer intents in smart contracts constitute significant security threats to decentralized applications, leading to substantial economic losses. Prior work introduced SmartIntentNN, a deep learning model for detecting unsafe developer intents. By combining the Universal Sentence Encoder, a K-means clustering-based intent highlighting mechanism, and a Bidirectional Long Short-Term Memory (BiLSTM) network, the model achieved an F1 score of 0.8633 on an evaluation set of 10,000 real-world smart contracts across ten distinct intent categories. This paper presents SmartIntentV2 (Smart Contract Intent Neural Network Version 2). The primary enhancement is the integration of a BERT-based pre-trained programming language model, which we domain-adaptively pre-train on a dataset of 16,000 real-world smart contracts using a Masked Language Modeling objective. SmartIntentV2 retains the BiLSTM-based multi-label classification network for intent detection. On the same evaluation set of 10,000 smart contracts, it achieves superior performance with an accuracy of 0.9789, precision of 0.9090, recall of 0.9476, and an F1 score of 0.9279, substantially outperforming its predecessor and other baseline models. Notably, SmartIntentV2 also delivers a 65.5% relative improvement in F1 score over GPT-4.1 on this specialized task. These results establish SmartIntentV2 as a new state-of-the-art model for smart contract intent detection.
R. Praveen Kumar, G. Gautham Kumar, Arun Amaithi Rajan, V. Vetriselvi ยท 5 authors
Remote sensing and satellite imaging have become essential in various geological and surveillance applications. These systems often rely on cloud platforms for storing satellite and aerial images, introducing trust and security concerns, especially in sensitive domains like border surveillance, monitoring, and reconnaissance. Traditional cloud solutions are prone to data breaches and adversarial attacks, highlighting the need for a secure, end-to-end framework. To address this, we propose a comprehensive security architecture for storing and retrieving sensitive remote sensing images. Our system ensures confidentiality, integrity, and access control, while also resisting adversarial attacks during image retrieval. It adopts a three-phase structure: secure authentication, secure storage, and secure retrieval. Authentication is achieved using a combination of Zero-Knowledge Proof and Quantum Key Distribution, establishing a tamper-proof user verification process. In the storage phase, quantum-based cryptography secures the images, while a deep hashing model resistant to adversarial attacks enables efficient indexing and retrieval. A watermark embedding mechanism helps detect insider threats and support forensic tracking in case of data breaches. Evaluated on a remote sensing image dataset using various backbone networks, our system achieved a retrieval accuracy of 94.77%, outperforming existing models by 8โ12%. The framework is well-suited for high-security environments, including military applications.
Chaos-based Image/Signal Encryption
Advanced Steganography and Watermarking Techniques
Amjad Almaghthawi, Wael M.S. Yafooz, Nasser S. Albalawi
In decentralized apps, smart contracts are used to conduct trusted transactions on the Blockchain (BC). While smart contracts are highly effective, they are also highly susceptible to security flaws, leading to serious financial consequences. However, the combination of BC technology and artificial intelligence provides a solution for powerful, secure, and decentralized applications in various sectors. Furthermore, large language models (LLMs), which are essential advanced machine learning frameworks, are now used in various applications, including customer service, chatbots, code generation, vulnerability detection, and language translation. This study investigates the use of LLMs for automated vulnerability detection in Solidity-based smart contracts. Specifically, three models are evaluated and compared: GPT-3.5-turbo, DeepSeek R1, and LLaMA-3. With a labeled, multi-class dataset including four vulnerability types, the models are assessed across three reasoning strategies: zero-shot, few-shot, and chain of thought. A prompt-based evaluation and performance comparison is conducted using standard metrics such as accuracy, precision, recall, F1-score, and average detection time. Results show that in the zero-shot setting, GPT-3.5-turbo achieves the highest accuracy of 94.59%, followed closely by LLaMA-3 with 92%, while DeepSeek R1 achieved 78.95%. In the few-shot setting, LLaMA-3 outperformed other models. Furthermore, in the CoT setting, LLaMA-3 demonstrates the strongest overall performance with 96% accuracy and an F1-score of 0.82, surpassing DeepSeek R1's average of 78.95% and GPT-3.5's CoT performance, which is notably lower. Hence, this study develops an evaluation framework for LLM-based vulnerability detection, and we have demonstrated that prompt engineering has the potential to enhance the security of smart contracts.
Dan Ivanov, Tristan Freiberg, Shahabi, Shirin, Jonathan Gold ยท 5 authors
DSperse is a modular framework for distributed machine learning inference with strategic cryptographic verification. Operating within the emerging paradigm of distributed zero-knowledge machine learning, DSperse avoids the high cost and rigidity of full-model circuitization by enabling targeted verification of strategically chosen subcomputations. These verifiable segments, or "slices", may cover part or all of the inference pipeline, with global consistency enforced through audit, replication, or economic incentives. This architecture supports a pragmatic form of trust minimization, localizing zero-knowledge proofs to the components where they provide the greatest value. We evaluate DSperse using multiple proving systems and report empirical results on memory usage, runtime, and circuit behavior under sliced and unsliced configurations. By allowing proof boundaries to align flexibly with the model's logical structure, DSperse supports scalable, targeted verification strategies suited to diverse deployment needs.
Open access
2 source records
Adversarial Robustness in Machine Learning
Physical Unclonable Functions (PUFs) and Hardware Security
Recent years have witnessed a rapid increase in the number of blockchain-based decentralized applications (DApps). As reported by DAppRadar, there are more than 5,000 DApps with more than 17.2 million daily Unique Active Wallets (users). However, it is also reported that some robots are used to manipulate the ranking, attract more users, cheat investors, etc. Hence, it is necessary to detect those robots. Unlike traditional robots or spam detection on Internet, each blockchain has its specific data structure with the impacts of exchanges and whales, leading to the challenges of detecting DApp robots. In this paper, we conduct the first systematic investigation on DApps robots, named DAppCheat. We first collect and release the first multi-blockchain DApp-user dataset, including 4,857 DApps and 99,758,959 users from Ethereum, EOSIO, TRON, and BSC. We propose a general parent account mechanism for multiple blockchains in order to find anonymous user collusion. We define the creating account weight and the used DApp volume weight to reduce the impacts of exchanges and whales. Extensive experimental results show the effectiveness of DAppCheat.
Security issues are becoming increasingly significant with the rapid evolution of Non-fungible Tokens (NFTs). As NFTs are traded as digital assets, they have emerged as prime targets for cyber attackers. In the development of NFT smart contracts, there may exist undiscovered defects that could lead to substantial financial losses if exploited. To tackle this issue, this paper presents a framework called NATLM(NFT Assistant LLM), designed to detect potential defects in NFT smart contracts. The framework effectively identifies four common types of vulnerabilities in NFT smart contracts: ERC-721 Reentrancy, Public Burn, Risky Mutable Proxy, and Unlimited Minting. Relying exclusively on large language models (LLMs) for defect detection can lead to a high false-positive rate. To enhance detection performance, NATLM integrates static analysis with LLMs, specifically Gemini Pro 1.5. Initially, NATLM employs static analysis to extract structural, syntactic, and execution flow information from the code, represented through Abstract Syntax Trees (AST) and Control Flow Graphs (CFG). These extracted features are then combined with vectors of known defect examples to create a matrix for input into the knowledge base. Subsequently, the feature vectors and code vectors of the analyzed contract are compared with the contents of the knowledge base. Finally, the LLM performs deep semantic analysis to enhance detection capabilities, providing a more comprehensive and accurate identification of potential security issues. Experimental results indicate that NATLM analyzed 8,672 collected NFT smart contracts, achieving an overall precision of 87.72%, a recall of 89.58%, and an F1 score of 88.94%. The results outperform other baseline experiments, successfully identifying four common types of defects.
With the increasing security issues in blockchain, smart contract vulnerability detection has become a research focus. Existing vulnerability detection methods have their limitations: 1) Static analysis methods struggle with complex scenarios. 2) Methods based on specialized pre-trained models perform well on specific datasets but have limited generalization capabilities. In contrast, general-purpose Large Language Models (LLMs) demonstrate impressive ability in adapting to new vulnerability patterns. However, they often underperform on specific vulnerability types compared to methods based on specialized pre-trained models. We also observe that explanations generated by generalpurpose LLMs can provide fine-grained code understanding information, contributing to improved detection performance. Inspired by these observations, we propose SAEL, a LLMbased framework for smart contract vulnerability detection. First, we design prompts targeting specific smart contract vulnerabilities to guide general-purpose LLMs in detecting vulnerabilities and providing explanations. The detection results generated by LLMs serve as prediction features. Then, we employ prompt-tuning on CodeT5 and T5 respectively to process contract code and explanations, enhancing model performance on specific tasks. To leverage the strengths of each component, we introduce Adaptive Mixture-of-Experts, a dynamic architecture for smart contract vulnerability detection. This mechanism dynamically adjusts feature weights through a Gating Network, which selects the most relevant features by applying TopK filtering and Softmax normalization, and a Multi-Head Self-Attention mechanism, which enhances cross-feature relationships by processing multiple attention heads in parallel. This design ensures that prediction results for LLMs, explanation features, and contract code features are effectively integrated through gradient optimization. The loss function focuses on the independent prediction performance of each feature and the overall performance of weighted predictions. Experimental results show that SAEL outperforms existing methods in detecting various vulnerabilities.
The results of this study highlight the effectiveness of the proposed semantic security detection framework, SSB, in identifying a wide range of vulnerabilities in smart contracts tailored for industrial control scenarios. Compared to existing tools like ZEUS, Securify, and VULTRON, SSB demonstrates superior logical coverage across various vulnerability types, as evidenced by its performance on smart contract samples. This suggests that semantic-based approaches, which integrate domain-specific invariants and runtime monitoring, can address the unique challenges of ICS, such as real-time constraints and semantic consistency between code and physical control logic. The framework's ability to model industrial invariants-covering security, functionality, consistency, time-related, and resource consumption aspects-provides a robust mechanism to prevent critical errors like unauthorized access or premature equipment operation. However, the lack of real-world ICS validation due to confidentiality constraints limits the generalizability of these findings. Future research should focus on adapting SSB for real industrial deployments, exploring scalability across diverse ICS architectures, and integrating advanced AI techniques for dynamic invariant adjustment. Additionally, addressing cross-chain interoperability and privacy concerns could further enhance the framework's applicability in complex industrial ecosystems.
Smart contracts, while foundational to decentralized applications, are susceptible to security vulnerabilities due to their immutable nature, potentially leading to significant financial losses. Existing$s$tatic a nalysis$t$ools,$s$uch a slither and Mythril, offer baseline detection but often lack accuracy and scalability for complex contracts. Similarly, emerging deep learning methods show promise but face challenges, including oversimplified multi-class c lassifications, di fficulties processing long code sequences, and the constraint of assigning each contract to a single vulnerability category. To overcome these limitations, we propose a binary classification f ramework focused on determining whether a contract is secure or possesses at least one known vulnerability. This approach uniquely combines static heuristic features (e.g., control-flow complexity and external call frequency) with contextual semantic embeddings derived from CodeBERT. CodeBERT, a transformerbased model pre-trained on source code, provides rich semantic and syntactic representations that complement static features and enhance detection performance. Evaluating five distinct machine learning models on the SolidiFI and SmartBugs benchmark datasets, we demonstrate that this hybrid strategy significantly e nhances d etection p erformance. N otably, our Logistic XGBoost classifier a chieves$1 0 0 \%$a ccuracy, precision, and recall on SolidiFI, although we acknowledge that SolidiFI's relative simplicity may contribute to overly optimistic results and potential overfitting risks. On SmartBugs, ensemble models consistently achieve over 95% accuracy, indicating strong generalization across more diverse and complex contracts.