Samuel Shiu retweeted
What is socket activation in systemd? 🤔
One of the key applications of systemd is to start and manage long-running background processes - daemons. Daemons are registered as systemd service units and typically start at boot.
However, if a service isn't needed immediately after boot and exposes a TCP or Unix socket API, it's more efficient to start it only when the first client connects. This technique is called socket activation.
The most fascinating part is how it's implemented - there is no magic, but you need to know the trick.
The listening socket is created as usual, but it's systemd itself that opens it. Once the first client arrives, systemd executes the daemon and passes it the socket's file descriptor. So the only "unusual" thing the daemon does is call socket.fromfd(SD_LISTEN_FDS_START) instead of creating a new socket itself.
Practice configuring socket activation for daemons with:
- TCP socket API labs.iximiuz.com/challenges/…
- Unix socket API labs.iximiuz.com/challenges/…
Happy hacking!
Samuel Shiu retweeted
If you’re a developer and can’t debug this without AI, you’re probably a vibe coder.
Note: Not for vibe coders.
Samuel Shiu retweeted
We finally got this series out. We tried to simplify Linux kernel exploitation for those interested in getting started. There are plenty of resources out there, but my impression is that they are written for experienced people, not for beginners in this complex field.
In this series, we tried to do something close to real-world kernel exploitation, but much simpler, so people can use it as a first contact with Linux kernel exploitation. I hope people like it, and we will be available to help anyone who wants to reproduce all the content.
Have you ever wanted to get started with Linux kernel exploitation? We wrote a 4-part blog series aimed at newcomers, going from setting up the environment to bypassing SMEP and KASLR. We exploit a real Linux kernel vulnerability step by step, debugging every crash along the way.
Introduction to Linux Kernel Exploitation: Vulnerability and Environment – Part 1
allelesecurity.com/intro-lin…
Introduction to Linux Kernel Exploitation: Triggering the Vulnerability – Part 2
allelesecurity.com/intro-lin…
Introduction to Linux Kernel Exploitation: Exploitation – Part 3
allelesecurity.com/intro-lin…
Introduction to Linux Kernel Exploitation: Mitigation Bypass (KASLR and SMEP) – Part 4
allelesecurity.com/intro-lin…
Samuel Shiu retweeted
learn Linux kernel exploitation from one of the best 👇
We finally got this series out. We tried to simplify Linux kernel exploitation for those interested in getting started. There are plenty of resources out there, but my impression is that they are written for experienced people, not for beginners in this complex field.
In this series, we tried to do something close to real-world kernel exploitation, but much simpler, so people can use it as a first contact with Linux kernel exploitation. I hope people like it, and we will be available to help anyone who wants to reproduce all the content.
Samuel Shiu retweeted
Why people should learn to code by hand: it's a mechanism for learning and teaching.
In much the same way you should still learn calculus, even if writing it by hand isn't that "useful" for your career.
@karpathy's series on llm's is a wonderful example (it's incredible btw).
Come in knowing a little calc AND python and you'll get a ton out of it very quickly. Following this would be much harder not knowing operator overloading, FP arithmetic, classes, etc.
The future is not writing python, rust, or asm by hand. But just like learning mathematical notation, grokking one or a few PLs well is a foundation on which you can build a lot of other deep knowledge, and gain a strong sense of computing systems.
Next stream series: building an LLM from scratch.
A lot of us "know how llms work." Prompts, context windows, tokens, kv caches. But if you're like me, you have a lot of holes in deeply understanding the math, training, and the way inference actually works.
Given how transformative they are to the entire planet, I want to dig in wayyyy more. So join me!
Going through this along with Karpathy's video series on stream the next few weeks.
Starting tomorrow 10am PT
Samuel Shiu retweeted
There's a device police use that makes your phone think it's a cell tower.
you've probably driven past one.
it's called a Stingray. technically: a cell site simulator or IMSI catcher, about the size of a suitcase. fits in a police car or a van.
Your phone is constantly scanning for the strongest signal and automatically connects to whatever tower looks most legitimate. the Stingray broadcasts a stronger signal than the real towers nearby. Your phone drops the real tower and connects to it instead.
but now your phone is talking to the cop car before it reaches the real network.
what the Stingray collects in that moment:
— your IMSI — a unique identifier tied to your SIM card
— your IMEI — the unique identifier of the physical device
— your precise location
— in some models: calls, texts, and data content
it does this to every phone in range. not just suspects. everyone driving by.
over 75 federal agencies use them. hundreds of local police departments. they've been deployed at protests, immigration operations, and political events. an IMSI catcher was detected at the 2024 Democratic National Convention.
Annapolis Police used one to investigate a robbery involving $56 worth of submarine sandwiches and chicken wings.
no warrant required in many jurisdictions, the legal framework is still being fought over.
the EFF released a tool called Rayhunter. you can build it for $20 using a cheap WiFi hotspot. It monitors your cell connection and turns red if it detects a simulator.
other names you might see: Hailstorm. KingFish. Gossamer. Amberjack. all cell site simulators. all do the same thing.
Replying to @T3chFalcon
If you care deeply about your phone privacy you shouldn't be using Android
GrapheneOS and iOS are better.
ىـ Day 298
🚨في أداة مخفية بالويندوز (Sigverif)
ليش جات؟ لن الهاكرز يزرعون ملفاتهم داخل ملفات الويندوز عشان نظام الحماية ما يشك فيها وبكذا يسرق بياناتك
فايدتها؟تفحص هوية (التوقيع الرقمي) لكل ملف بالنظام.
للفحص:اضغط (ويندوز) اكتب Sigverif
شيكو على أجهزتكم
(تفاعلك يساعد غيرك)🤎
ىـ Day 297
أداة Hping3
تطعيك low-level packet crafter و تعطيك تحكم كامل في TCP/IP stack وتخليك تشوف كيف الشبكة تفكر مو كيف ترد.
🔧 وش تقدر تسوي فيها؟
تفحصFirewall Testing
تحاكي هجمات DDoS للختبار
ترسل TCP / UDP / ICMP بشكل مخصص
ادأة قوية وفيها تفاصيل اقوى
الرابط:
github.com/antirez/hping
(تفاعلك يساعد غيرك)🤎
و اتمنى من الله انكم استفدتم وعسى الله ينفع بنا جميعاً
how to study and learn really difficult subjects:
1. don’t panic. hard just means dense. it’s not impossible, it’s just packed. unwrap it slowly.
2. get a map before diving in. watch an overview video, read the table of contents, or skim the wikipedia page. you need context first.
3. use multiple sources. one book will confuse you, two will clarify, three will enlighten.
4. build intuition, not memory. visualize it. simulate it. code it. teach it to a friend or a wall.
5. tolerate confusion. you’ll feel dumb 90% of the time; that’s the price of learning something that rewires your brain.
6. connect it to reality. every abstract thing has a real-world analog. find it. relate it. ground it.
7. revisit the same topic after a week. mastery is not about reading once; it’s about returning after your brain has “chewed” on it.
8. don’t romanticize genius. smart people aren’t born knowing it. they just survived longer in the confusion phase.
the truth is; learning hard stuff isn’t about intelligence.
it’s about endurance, humility, and curiosity.
you stay long enough in the fog until it clears.
Samuel Shiu retweeted
回路や基板はこんな感じです。
REF35(電圧リファレンス)出力を参照しつつ、2段階のV-I コンバータにより、1 / 10 / 100 uAのソース電流を生成しています
hFEの測定に使った回路と基板をGitHubで公開します
1 / 10 /100 uAの3レンジでベース電流を調整可能で、2台のDMM or DMM+SMU で測定します。NPNトランジスタのみ測定可能です。
使い方はツリー↓に記します。
github.com/mjm-12/transistor…
Samuel Shiu retweeted
新闻里天天在聊 3 纳米、先进封装、光刻机,真要说清一颗芯片到底怎么造出来的,很多人其实也讲不明白。
《半导体制造概论》是一本开源的入门书,跟着一片晶圆从沙子出发,一路走过晶圆厂、测试和封装,直到变成芯片。
全书 25 章,繁重的物理推导基本跳过,重点讲工艺流程、专业术语和工厂一线的经验,每章都配了术语框和经验框。
GitHub:github.com/chenwei810/Semico…
我最想先看的是「几纳米到底是什么意思」那一章,这个问题被问过太多次了,难得有人从工艺的角度认真讲一遍。
附录还整理了术语总表和晶圆厂的现场行话,原文是繁体中文,另外有英文、日文、韩文版本。
只想快速了解的,看第 0、1、11、14 这四章就够了,做软件固件的、准备进这行的,书里也各配了一条阅读路线。
Samuel Shiu retweeted
Mobile Network Hacking: Reconnaissance on Your Local Mobile Network
Hackers can gather information on your local mobile network to:
1. Intercept Your Mobile Traffic
2. Track Your Location
3. Deny Access to the Mobile Network (DoS)
hackers-arise.com/mobile-net…
Samuel Shiu retweeted
Qué lindo el código fuente de algunos routers chinos…. son tan tiernos que te abrazan fuerte. 🫶
Samuel Shiu retweeted
Why is the "Differential Amplifier" so Important for Modern Electronics?
If you’ve ever looked at the internal schematic of an Operational Amplifier (Op-Amp), you’ve seen it: the Transistor Differential Amplifier, also known as the Long-Tailed Pair (LTP).
But why is this specific configuration so critical to analogue design?
Derived from the brilliant work of British scientist, Alan Blumlein in the 1930s, the LTP transitioned from vacuum tubes to transistors to become the fundamental building block of high-performance amplifiers. Here’s why it’s a design "must-know":
🔹 Differential Gain vs. Common Mode Rejection: The circuit’s superpower is its ability to amplify the difference between two signals while ignoring noise that is common to both. This is quantified by the Common Mode Rejection Ratio (CMRR). High CMRR is the reason your audio and data cables can run through noisy environments without losing signal integrity.
🔹 The "Long Tail" Secret: The performance of the circuit relies on the "tail" resistor (or constant current source) connected to the emitters. The higher the impedance of this tail, the better the balance and the higher the CMRR. In ICs this is typically replaced by an active current source for better performance.
🔹 Symmetry is King: Because the circuit uses two matched transistors, it is inherently stable against temperature fluctuations. If the temperature rises, both transistors are affected equally, keeping the output balanced.
From precision instrumentation to high-fidelity audio and integrated circuits, the Long-Tailed Pair remains as relevant today as it was 80 years ago.
What are your experiences with this circuit? Let me know in the comments.
Check out the link in the comments for more information.
#ElectronicsEngineering #AnalogDesign #CircuitDesign #Transistors #ElectricalEngineering #TechHistory #electronicsnotes
Samuel Shiu retweeted
Minimum-Cost Maximum-Flow in just 110 lines of C++
SPFA finds the cheapest augmenting paths through a residual graph
reverse edges use the elegant e ^ 1 trick
push the bottleneck flow until no more augmentation is possible















































