프로젝트
GitHub에서 보기 1. Basic Quine (
2. Fortran Quine (
3. Trojanized Quine (
4. Obfuscated Trojan Quine (
LaurieWired/Quine
소개
Quines demonstrating self-propagation
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalQuine - Compiler Original Sin
This repository contains code examples demonstrating concepts from Ken Thompson's 1984 Turing Award lecture Reflections on Trusting Trust. These quines illustrate the ideas behind self-propagating code. Thompson shared the concept of a self-propagating compiler backdoor that could survive indefinitely without leaving evidence in the source code.
Contents
- Self-Producing Program (Quine): Program that outputs its own source code
- "Trojanized" Quine: Self-producing program that inject purposeful modifications
- Obfuscated "Trojan" Quine: Simple obfuscation to hide the injected modifications
Code Examples
1. Basic Quine (quine.c)
gcc quine.c -o quine
./quine
2. Fortran Quine (fort_quine.f90)
gfortran fort_quine.f90 -o fort_quine
./fort_quine
3. Trojanized Quine (trojan_quine.c)
Demonstrates payload injection by replacing the word "right" with "wrong" in its output.
gcc trojan_quine.c -o trojan_quine
./trojan_quine
4. Obfuscated Trojan Quine (obfuscated_trojan_quine.c)
gcc obfuscated_trojan_quine.c -o obfuscated_trojan_quine
./obfuscated_trojan_quine
Testing the Examples
Verify that the quines work correctly by comparing their output to their source:
# Test basic quine
./quine > output.c
diff quine.c output.c
# Test trojan quine (will show differences due to "right" -> "wrong" replacement)
./trojan_quine > trojan_output.c
diff trojan_quine.c trojan_output.c
관련 프로젝트 살펴보기
불러오는 중…