Do It by Code
54 subscribers
710 photos
99 videos
14 files
1.24K links
We uhhhhh... do things by coding them.
Download Telegram
Forwarded from Gopher Academy (bardia.go)
Gopher Academy
Top 8 Cache Eviction Strategies. 👇👇👇👇👇 🕊 @gopher_academy | @GolangEngineers
op 8 Cache Eviction Strategies.
.
.
🔹 LRU (Least Recently Used)
LRU eviction strategy removes the least recently accessed items first. This approach is based on the principle that items accessed recently are more likely to be accessed again in the near future.

🔹 MRU (Most Recently Used)
Contrary to LRU, the MRU algorithm removes the most recently used items first. This strategy can be useful in scenarios where the most recently accessed items are less likely to be accessed again soon.

🔹 SLRU (Segmented LRU)
SLRU divides the cache into two segments: a probationary segment and a protected segment. New items are initially placed into the probationary segment. If an item in the probationary segment is accessed again, it is promoted to the protected segment.

🔹 LFU (Least Frequently Used)
LFU algorithm evicts the items with the lowest access frequency.

🔹 FIFO (First In First Out)
FIFO is one of the simplest caching strategies, where the cache behaves in a queue-like manner, evicting the oldest items first, regardless of their access patterns or frequency.

🔹 TTL (Time-to-Live)
While not strictly an eviction algorithm, TTL is a strategy where each cache item is given a specific lifespan.

🔹 Two-Tiered Caching
In Two-Tiered Caching strategy, we use an in-memory cache for the first layer and a distributed cache for the second layer.

🔹 RR (Random Replacement)
Random Replacement algorithm randomly selects a cache item and evicts it to make space for new items. This method is also simple to implement and does not require tracking access patterns or frequencies.


🕊 @gopher_academy | @GolangEngineers
6502 – Guideline to Reverse Engineering (how to read die shots) [pdf]
Article, Comments
Exploit.education

provides a variety of resources that can be used to learn about vulnerability analysis, exploit development, software debugging, binary analysis, and general cyber security issues.
Systemd Wants to Expand to Include a Sudo Replacement
Article, Comments
Do It by Code via @wiki
https://en.wikipedia.org/wiki/Rootkit
#روت‌کیت
وقتی یه نرم افزاری (یه Process) روی یه سیستم عامل ران میشه (حالا چه ویندوز باشه، چه لینوکس باشه، چه اندروید باشه و ...)؛ یه سری دسترسی های خاص خودش رو داره

دسترسی هایی که یه Process میتونه داشته باشه، کاملا بستگی داره به اون یوزری که اون پروسز رو استارت کرده

بطور مثال، اگه شما یه پروسز رو با یوزر عادی سیستمتون استارت کنید، منطقا خودش به تنهایی دسترسی پاک کردن فایل های سیستمی مهم و یا دستکاری رجیستری سیستم رو نداره (مثلا وقتی میبینین میخواین یه installer رو باز کنین، ازتون اجازه ی ادمین میخواد.‌ چون میخواد به رجیستری دسترسی پیدا کنه)

حالا روت کیت چیه؟ به یه ابزاری گفته میشه (که معمولا بصورت غیر مجاز، با استفاده از باگ ها و vulnerability های سیستم)، یکاری میکنه که پروسزی که با یه یوزر عادی ران میشه، دسترسی ادمین (روت) بگیره.

برای تست امنیت سیستم عامل (و نرم افزار های مختلف مثل sudo) هم خیلی استفاده داره.
Do It by Code
How an empty S3 bucket can make your AWS bill explode Article, Comments
خلاصه ی این داستان:
AWS = Amazon Web Services
Amazon S3 = Amazon Simple Storage Service

یه سرویس storage ئه که آمازون ارائه میده.
داخلش، یه چیزی وجود داره به اسم bucket که شما میتونین دیتا رو داخلش بریزین

و به اندازه ی دیتایی که داخلش میریزین، همون قدر هم ازتون پول میگیره
به این مدل گفته میشه:
pay-as-you-go (PAYG)
ینی اول مصرف میکنی، بعد اخر ماه (مثلا) به اندازه ی مصرفیت، پولش رو پرداخت میکنی

حالا چه کسی میتونه روی این bucket ها دیتا آپلود کنه؟
خب مشخصا فقط شما

ولی یه باگی که آمازون پیدا کرده، اینه که Unauthorized Request ها رو هم میاره جزو اینا حساب میکنه =))
یعنی فکر کنین یکی رمز حساب کاربری شما رو نداره، ولی با همین درخواست فرستادن الکی باعث میشه که شما فیش آخر ماهتون خیلی بیشتر بشه!

به این عمل توی دنیای برنامه نویسی گفته میشه:
Denial of Wallet Amplification Attack

یعنی طرف آخر ماه باید کلی پول پرداخت کنه برای چیزی که حتی استفاده هم نکرده!