umisec
Games · bots · anti-cheatOyunlar · botlar · anti-cheat

Game projects and game-server security

Oyun projeleri ve oyun sunucusu güvenliği

I grew up on Knight Online. Today's servers are pay-to-win, so I'm building my own world: a single-player game full of human-like bots, a bot lab on a local server, and next, a transparent server-side anti-cheat. Everything runs on my own machine. No official or third-party server is touched, and no game files are distributed.

Knight Online'la büyüdüm. Bugünün sunucuları para öde-kazan, o yüzden kendi dünyamı kuruyorum: insan gibi botlarla dolu tek oyunculu bir oyun, yerel sunucuda bir bot laboratuvarı ve sırada şeffaf, sunucu taraflı bir anti-cheat. Her şey kendi bilgisayarımda çalışır. Resmî ya da üçüncü taraf hiçbir sunucuya dokunulmaz, oyun dosyası dağıtılmaz.

Knight Online is a trademark of its respective owners. These are private, non-commercial hobby projects.

Knight Online, sahiplerinin ticari markasıdır. Bunlar özel, ticari olmayan hobi projeleridir.

01 — Knight Offline

A world of bots that aren't allowed to cheat

Hile yapmasına izin verilmeyen botlarla dolu bir dünya

A browser-playable, single-player remake of the classic 2000s era of the game. A custom three.js engine reads the original client file formats. Game rules are ported from the open-source OpenKO server emulator, with source references in the comments. The world lives in a local Node.js server backed by SQLite. It's about 54,000 lines of JavaScript in a private repository.

Oyunun 2000'lerdeki klasik döneminin tarayıcıda oynanan, tek oyunculu yeniden yapımı. Kendi yazdığımız three.js motoru orijinal istemci dosya biçimlerini okur; oyun kuralları açık kaynak OpenKO sunucu emülatöründen, yorumlarda kaynak gösterilerek aktarılır; dünya SQLite'lı yerel bir Node.js sunucusunda yaşar. Yaklaşık 54.000 satır JavaScript, özel depo.

The heart of the project is 50–100 bots that start at level 1 with no weapon. They hunt, fight over hunting spots, steal kills, form parties, open market stalls and travel between zones. The bot mind is split into 26 single-purpose modules: persona, perception, beliefs, mood and memory, decision layer, A* movement, skill choice, potion policy, shopping, market, party, hunting-spot and kill-steal rules, chat, cooperation, quests, zone travel and a rendering budget.

Projenin kalbi 1. seviyeden silahsız başlayan 50–100 bot: mob keser, slot kapışır, KS atar, pt kurar, pazar açar, bölgeler arası yolculuk yapar. Bot aklı tek işli 26 modüle ayrılmıştır: kimlik, algı, kanaat, ruh hali ve hafıza, karar katmanı, A* hareket, skill seçimi, pot politikası, alışveriş, pazar, pt, slot ve KS kuralları, sohbet, iş birliği, görev, bölge yolculuğu, görüntü bütçesi.

Rule: bot = player. Bots use the same code and rules as the human. They only know what their perception gives them: no seeing through walls, no knowing every monster on the map. Each thought takes 0.25–0.6 s, and bots don't think in sync. That makes a bot that is forbidden to cheat a precise definition of legitimate play, which is the baseline an anti-cheat needs.

Kural: bot = oyuncu. Botlar oyuncuyla aynı kodu ve kuralları kullanır, yalnız algılarının verdiğini bilir: duvar arkasını görmez, haritadaki her mobu bilmez; her düşünce 0,25–0,6 sn sürer ve botlar senkron düşünmez. Hile yapması yasak bir bot, meşru oyunun kesin bir tanımıdır; anti-cheat'in ihtiyaç duyduğu taban çizgisi de budur.

Behaviour changes are measured in a headless bot lab with batch runs and A/B switches. A deterministic "fight table" computes damage and farming efficiency from the game's formulas, so skilled bots can know the numbers the way veteran players do.

Davranış değişiklikleri, toplu koşu ve A/B anahtarlarıyla başsız bir bot laboratuvarında ölçülür. Deterministik bir "dövüş tablosu" hasarı ve kasma verimini oyunun formüllerinden hesaplar; usta botlar, eski oyuncular gibi sayıları bilir.

02 — Bot labBot laboratuvarı

Clientless bots on a server I compile myself

Kendi derlediğim sunucuda istemcisiz botlar

03 — Source auditKaynak denetimi

What auditing "free" server packages taught me

"Bedava" sunucu paketlerini denetlemek bana ne öğretti

FindingBulguRiskRiskActionYapılan
Hard-coded developer IPKoda gömülü geliştirici IP'siOne outside machine was exempt from the connection-throttling limit: a quiet bypass.Dışarıdaki tek bir makine bağlantı sınırından muaf: sessiz bir atlatma.Removed. The exemption now covers only 127.0.0.1.Kaldırıldı; muafiyet artık yalnız 127.0.0.1.
Bundled crash reporterGömülü çökme raporlayıcıIt emailed crash dumps and a screenshot of the server desktop to a third-party address.Çökme dökümünü ve sunucu masaüstünün ekran görüntüsünü üçüncü bir adrese e-postayla yolluyordu.Replaced with local minidumps.Yerel minidump ile değiştirildi.
Memory-safety bugsBellek güvenliği hatalarıAn uninitialized pointer in a party-kill reward path, and a stack overflow from a large object in a warehouse handler.PK pt ödülünde ilklenmemiş işaretçi; depo işleyicisinde büyük nesneden yığın taşması.Fixed.Düzeltildi.
Infected archivesVirüslü arşivlerReal file-infector malware (Defender: Jeefo, Parite, Mikcer) sat next to "clean" sources."Temiz" kaynakların yanında gerçek dosya virüsleri (Defender: Jeefo, Parite, Mikcer).Package binaries are never run. Everything is built from source and inspected statically only.Paket exe'leri hiç çalıştırılmaz; kaynaktan derlenir; yalnız statik inceleme.

Many anti-cheat products sold to private servers appear to share a single code lineage, so one hidden weakness affects many servers. That's why I want to build my own, in the open.

Özel sunuculara satılan birçok anti-cheat ürünü tek bir kod soyundan geliyor gibi görünüyor: bir gizli açık, birçok sunucu. Kendiminkini açıkça geliştirmek istememin sebebi bu.

04 — Anti-cheat plannedplanda

Server-authoritative, privacy-respecting

Sunucu otoriteli, mahremiyete saygılı

Checks on the server

Sunucudaki denetimler

  • Movement: speed against the character's maximum (including speed buffs), teleport-like position jumps, and walking through blocked terrain.
  • Combat: attack and skill rate against cooldowns and cast times, range checks, and damage within formula bounds.
  • Economy: item and gold invariants, covering duplication, impossible trades and inventory mismatches.
  • Protocol: packet rate limits, state and sequence checks, and malformed packets.
  • Client data: hashes of the client's data tables, compared on the server.
  • Hareket: karakterin azami hızına (hız buff'ları dahil) karşı hız, ışınlanma gibi konum sıçramaları, geçilmez zeminden yürüme.
  • Dövüş: cooldown ve cast süresine karşı saldırı ve skill sıklığı, menzil, formül sınırları içinde hasar.
  • Ekonomi: item ve gold değişmezleri: kopyalama, imkânsız takas, envanter uyuşmazlığı.
  • Protokol: paket sıklığı sınırı, durum ve sıra denetimi, bozuk paket.
  • İstemci verisi: istemcinin veri tablolarının özetleri, sunucuda karşılaştırılır.

How it gets tested

Nasıl sınanacak

  1. Honest bots, built on Knight Offline's rules, define normal play.
  2. Lab bots deliberately break one rule at a time (speed, attack rate, duplication attempts). Each run is labelled.
  3. Detection rate and false positives are measured on my local server before any real use.
  1. Knight Offline kurallarıyla yazılmış dürüst botlar normal oyunu tanımlar.
  2. Laboratuvar botları her seferinde tek bir kuralı bilerek çiğner (hız, saldırı sıklığı, kopyalama denemesi), her koşu etiketlidir.
  3. Gerçek kullanımdan önce yakalama oranı ve yanlış alarm yerel sunucumda ölçülür.

Limits I choose: no kernel drivers, no screenshots or file scanning on players' PCs, and no data sent to third parties. Every detection is logged with its evidence. After finding a crash reporter that silently sent screenshots, I won't ship one.

Seçtiğim sınırlar: çekirdek sürücüsü yok, oyuncunun bilgisayarında ekran görüntüsü ya da dosya taraması yok, üçüncü tarafa veri yok. Her tespit kanıtıyla günlüğe yazılır. Sessizce ekran görüntüsü yollayan bir raporlayıcı bulduktan sonra böylesini yapmam.

05 — CG50 prototypeprototip

A motorcycle simulator by a motorcycle instructor

Bir motosiklet eğitmeninden motosiklet simülatörü

A riding simulator in Unity, modelled on the Kuba Çita 100R, a small motorcycle that's common in Türkiye. The code covers motorcycle physics with an autopilot for testing, procedural engine sound (core, filters and per-bike profiles), rider arms solved with IK and synced to handlebar geometry, and editor tools that generate a road from real route data: a 3 km stretch of the D555 with layered asphalt, lane markings and kerbs. Private repository, early stage.

Türkiye'de yaygın küçük bir motosiklet olan Kuba Çita 100R üzerine Unity'de sürüş simülatörü. Kodda: test için otopilotlu motosiklet fiziği, yordamsal motor sesi (çekirdek, filtre, motor başına profil), IK ile çözülüp gidon geometrisine bağlanan sürücü kolları, gerçek güzergâh verisinden yol üreten editör araçları: D555'in 3 km'lik bir kesiti, katmanlı asfalt, şerit ve bordürlerle. Özel depo, erken aşama.