# Wyszukiwanie podobnych funkcji w kodzie binarnym

EN: **Binary code similarity detection** · id `binsimilarity` · aliases: BCSD, binary function similarity, binary code search, function embedding, wyszukiwanie podobnego kodu binarnego

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [AI w cyberbezpieczeństwie](https://aiatlasgraph.com/t/cyberai.md) › [Analiza programów binarnych i inżynieria wsteczna z AI](https://aiatlasgraph.com/t/binaryai.md) › Wyszukiwanie podobnych funkcji w kodzie binarnym

## Description

- PL: Uczenie osadzeń funkcji binarnych, tak by ten sam kod skompilowany różnymi kompilatorami, opcjami lub na różne architektury leżał blisko siebie.
- EN: Learning embeddings of binary functions so the same code compiled with different compilers, options or architectures lies close together.

## In one sentence

- PL: Rozpoznawanie, że dwa fragmenty gotowych programów pochodzą z tego samego kodu, nawet jeśli po kompilacji wyglądają zupełnie inaczej.
- EN: Recognising that two pieces of finished programs come from the same code, even if they look completely different after compiling.

## Problem it solves

- PL: Gdy w popularnej bibliotece wychodzi dziura, nikt nie wie, w których urządzeniach i programach siedzi jej skompilowana kopia.
- EN: When a hole turns up in a popular library, nobody knows which devices and programs carry a compiled copy of it.

## What it does

- PL: Jak rozpoznawanie piosenki granej w innej tonacji i tempie: liczy się melodia, a nie konkretne nuty.
- EN: Like recognising a song played in another key and tempo: the melody counts, not the exact notes.

## Everyday example

- PL: Producent routerów sprawdza swoje oprogramowanie i dowiaduje się, że trzy modele zawierają starą wersję biblioteki szyfrującej ze znaną luką.
- EN: A router maker scans its firmware and learns that three models contain an old version of an encryption library with a known flaw.

## This concerns you if you…

- PL: sprawdzasz oprogramowanie urządzeń pod kątem znanych luk
- PL: porównujesz wersje szkodników
- PL: interesujesz się wyszukiwaniem przez osadzenia
- EN: check device firmware for known flaws
- EN: compare malware versions
- EN: are interested in embedding-based search

## Keywords

jTrans · BinaryCorp · jump-aware transformer · binary function embeddings · vulnerability search · cross-architecture · control flow

## How it works

- PL: Model koduje zdeasemblowane instrukcje i relacje skoków w reprezentację funkcji. Po pretreningu reprezentacje porównuje się, aby wyszukiwać funkcje podobne do znanego podatnego wzorca; jTrans stosuje w tym celu reprezentację uwzględniającą skoki.
- EN: A model encodes disassembled instructions and jump relationships into a function representation. After pretraining, representations are compared to retrieve functions similar to a known vulnerable pattern; jTrans uses a jump-aware representation for this purpose.

## Limits

- PL: Wynik jTrans pochodzi z korpusu BinaryCorp i zadań wyszukiwania znanych podatności. Podobieństwo reprezentacji nie jest dowodem równoważności semantycznej, a skuteczność zależy od kompilatora, architektury i pokrycia danych treningowych.
- EN: The jTrans result comes from the BinaryCorp corpus and known-vulnerability search tasks. Representation similarity is not proof of semantic equivalence, and effectiveness depends on compiler, architecture, and training-data coverage.

## Key terms

- PL: **osadzenie funkcji**: Wektor liczb streszczający cechy funkcji używane do wyszukiwania podobnego kodu.
- PL: **graf przepływu sterowania**: Mapa możliwych ścieżek wykonania w funkcji.
- PL: **reprezentacja uwzględniająca skoki**: Kodowanie, które łączy instrukcje z informacją o celach i relacjach skoków.
- EN: **function embedding**: A numeric vector summarizing function features used to retrieve similar code.
- EN: **control-flow graph**: A map of possible execution paths through a function.
- EN: **jump-aware representation**: An encoding that combines instructions with information about jump targets and relationships.

## Know first

- [Embeddingi zdań i dokumentów (modele embeddingowe) (Sentence and document embeddings (embedding models))](https://aiatlasgraph.com/t/textembeddings.md)
- [Enkoder, dekoder i enkoder–dekoder (BERT, GPT, T5) (Encoder-only, decoder-only and encoder–decoder models)](https://aiatlasgraph.com/t/transformerfamilies.md)

## Related topics

Untyped, symmetric "see also" links.

- [Wykrywanie podatności w kodzie przez modele językowe (Vulnerability detection in source code with language models)](https://aiatlasgraph.com/t/llmvulndetect.md)

## Sources

- [jTrans: Jump-Aware Transformer for Binary Code Similarity Detection](<https://arxiv.org/abs/2205.12713>) `wang-jtrans-2022` · by Hao Wang, Wenjie Qu, Gilad Katz, Wenyu Zhu, Zeyu Gao, Han Qiu, Jianwei Zhuge, Chao Zhang

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/binsimilarity · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
