The document discusses LR parsing, which is a technique for parsing input strings according to a context-free grammar. It provides examples of parsing the input string "1 + 2 * 3" according to a sample grammar using an LR parsing table. Each step of the parsing is explained, including shifting and reducing grammar rules based on the table entries and the stack contents. The overall process demonstrates how LR parsing uses a parsing table derived from the grammar to iteratively parse the input from left to right.
CTF for ビギナーズのネットワーク講習で使用した資料です。
講習に使用したファイルは、以下のリンク先にあります。
https://onedrive.live.com/redir?resid=5EC2715BAF0C5F2B!10056&authkey=!ANE0wqC_trouhy0&ithint=folder%2czip
This document summarizes a microservices meetup hosted by @mosa_siru. Key points include:
1. @mosa_siru is an engineer at DeNA and CTO of Gunosy.
2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesis, Lambda, SQS and API Gateway.
3. Challenges discussed were managing 30 microservices, ensuring API latency below 50ms across availability zones, and handling 10 requests per second with nginx load balancing across 20 servers.
This document summarizes a microservices meetup hosted by @mosa_siru. Key points include:
1. @mosa_siru is an engineer at DeNA and CTO of Gunosy.
2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesis, Lambda, SQS and API Gateway.
3. Challenges discussed were managing 30 microservices, ensuring API latency below 50ms across availability zones, and handling 10 requests per second with nginx load balancing across 20 servers.
The document discusses reverse engineering techniques for bug hunting and exploit development. It covers analyzing software, hardware, applications, operating systems and firmware through static and dynamic reverse engineering. Static techniques include disassembling and analyzing binary code while dynamic techniques involve emulating or debugging running programs. The document also discusses fuzzing techniques, common bug classes, challenges like obfuscated code, and tools like LLVM and LibFuzzer that can be used for reverse engineering and fuzzing. The overall goal of reverse engineering discussed is to develop exploits by finding and analyzing bugs, whether to develop without source code, bypass restrictions, or for malware analysis and curiosity.
Play with FILE Structure - Yet Another Binary Exploit TechniqueAngel Boy
The document discusses exploiting the FILE structure in C programs. It provides an overview of how file streams and the FILE structure work. Key points include that the FILE structure contains flags, buffers, a file descriptor, and a virtual function table. It describes how functions like fopen, fread, and fwrite interact with the FILE structure. It then discusses potential exploitation techniques like overwriting the virtual function table or FILE's linked list to gain control of program flow. It notes defenses like vtable verification implemented in modern libc libraries.
Reverse engineering involves duplicating an existing product without drawings or documentation by analyzing the product. It is commonly used when the original manufacturer no longer produces the product, documentation has been lost, or to improve and redesign products. The reverse engineering process involves analyzing a product to understand its components, operation, and manufacturing methods without reliance on original documentation.
The document discusses reverse engineering and several projects using 3D laser scanning and reverse engineering techniques. It describes reverse engineering as discovering how a device works through analysis of its structure and function. Several tools for reverse engineering are mentioned, including 3D printers, laser sintering machines, CMM, and 3D scanners. Several projects are summarized that used 3D laser scanning for applications like creating digital part catalogs, CAD-to-part inspection, digitizing sculptures for replication, mold design and manufacture, and digital 3D CAD catalogs for parts.
Reverse engineering is the process of analyzing a product or system to understand its design, functionality, and operation. It involves taking something apart and studying how it works. Reverse engineering can be used to retrieve lost source code, study how a program performs operations, improve performance, fix bugs, or identify malicious content. It is commonly used for security research, software development, product analysis, and understanding legacy software when documentation is lost. The key steps of reverse engineering involve collecting information, examining the structure and functionality, and documenting the recovered design. Common tools used include disassemblers, debuggers, and decompilers. While useful, the legality of reverse engineering varies depending on jurisdiction and software licenses.
This document outlines a WebQuest project for a 10th grade engineering class that involves reverse engineering simple machines. Students will be assigned to groups to disassemble, analyze, and reassemble a simple machine. They will investigate why it was designed a certain way and explain how it works using Newton's laws of motion. Students will then give a speech to present their findings and submit a report summarizing what they learned. The project aims to engage students hands-on and spark curiosity about everyday items and engineering principles.
Reverse engineering is the process of systematically evaluating a product to replicate or redesign it. It is an important step in product development that allows optimization of resources and reduction in development time and costs. The reverse engineering process involves digitizing an existing object through scanning or other methods, processing the captured data to create a CAD model, and then using that model to develop prototypes or redesign parts as needed. It has various applications in fields like manufacturing, software, chemicals, entertainment, and medicine. A case study described how reverse engineering and rapid prototyping were used together to redesign turbine blades by capturing high-quality surface data and iteratively digitizing to create accurate CAD models.
This document discusses reverse engineering, which is the process of redesigning an existing product to improve its functions, quality, and useful life. Reverse engineering involves measuring an existing physical object without drawings or documentation to develop a CAD model. This process reduces manufacturing costs and allows for redesigning undesirable features. Key steps include digitizing the physical object through contact or non-contact scanning, manipulating the collected data points to develop surface models, and generating CAD files that can be used for applications like manufacturing or medical imaging. The document outlines advantages like cost savings, quality improvements, and competitive advantages through reverse engineering.
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017Carol Smith
What is machine learning? Is UX relevant in the age of artificial intelligence (AI)? How can I take advantage of cognitive computing? Get answers to these questions and learn about the implications for your work in this session. Carol will help you understand at a basic level how these systems are built and what is required to get insights from them. Carol will present examples of how machine learning is already being used and explore the ethical challenges inherent in creating AI. You will walk away with an awareness of the weaknesses of AI and the knowledge of how these systems work.
3. Linux での process address space model kernel stack text mmap data bss heap 矢印はデータ量の増加と ともに、伸びる方向 使用中 使用中 使用中 今日は、ここ、 heap と呼ばれる領域のお話 low high free free free
4. 古典的 malloc プログラミング言語 C (いわゆる K&R) で紹介された初期の Unix の malloc 実装 使用中 使用中 使用中 free listの head 使用中 ・ free list を使って空きメモリを管理 ・プロセス全体でただ1つの Heap を使う ・ malloc するときに管理領域分だけ多く allocate して先頭に管理領域を付加 ( どこかに管理領域がないと free するときに開放 size がわからない ) ・割り付け strategy は first fit. union header{ struct{ union header* ptr; unsigned size; }s; long alignment; };
5. malloc のアルゴリズム 使用中 使用中 使用中 free listの head 使用中 このぐらい 欲しい X 足りない 1.まず、 list head から先頭ポインタを get 2.空き領域が十分か調べる ・・・・小さすぎた
6. malloc のアルゴリズム 使用中 使用中 使用中 free listの head 使用中 X また足りない X このぐらい 欲しい 1.まず、 list head から先頭ポインタを get 2.空き領域が十分か調べる 3.ポインタを list の次の要素に進める 4.また空き領域が十分か調べる うむむ。。また小さい
7. malloc のアルゴリズム 使用中 使用中 使用中 free listの head 使用中 1.まず、 list head から先頭ポインタを get 2.空き領域が十分か調べる 3.ポインタを list の次の要素に進める 4.また空き領域が十分か調べる 5.また、ポインタを次の要素に進める 6.またまた、空き領域を調べる 今度はあった!! X OK X このぐらい 欲しい
8. malloc のアルゴリズム 使用中 使用中 使用中 free listの head 使用中 1.まず、 list head から先頭ポインタを get 2.空き領域が十分か調べる 3.ポインタを list の次の要素に進める 4.また空き領域が十分か調べる 5.また、ポインタを次の要素に進める 6.またまた、空き領域を調べる 7.空き領域を2つに分けて、 free list をつなぎなおす 8. list head を更新 今確保した 領域 最後に探索が失敗した場所 (アロケートされたメモリの 1つ前 の要素) を指すように変更
10. free のアルゴリズム 使用中 使用中 使用中 free listの head 使用中 free したい 領域 1. free list head から最初のポインタをゲット 2.最初の要素の、さらに次のポインタもゲット (next = p->s.ptr) 3. p < bp < next が成立しないので次へ bp p next
11. free のアルゴリズム 使用中 使用中 使用中 free listの head 使用中 free したい 領域 bp p next 1. free list head から最初のポインタをゲット 2.最初の要素の、さらに次のポインタもゲット (next = p->s.ptr) 3. p < bp < next が成立しないので次へ 4. p を次の要素に進める 5 .次のポインタをゲット 6 . p < bp < next が成立した
12. free のアルゴリズム 使用中 使用中 使用中 free listの head 使用中 bp p 7 . p と bp は隣接していない (p + p->s.size != bp) ので併合しない next 1. free list head から最初のポインタをゲット 2.最初の要素の、さらに次のポインタもゲット (next = p->s.ptr) 3. p < bp < next が成立しないので次へ 4. p を次の要素に進める 5 .次のポインタをゲット 6 . p < bp < next が成立した 8. bp と p->s.ptr は隣接しているので (bp + bp->s.size == next) 併合 free したい 領域
13. free のアルゴリズム 使用中 使用中 使用中 free listの head 使用中 bp p 7 . p と bp は隣接していない (p + p->s.size != bp) ので併合しない next 1. free list head から最初のポインタをゲット 2.最初の要素の、さらに次のポインタもゲット (next = p->s.ptr) 3. p < bp < next が成立しないので次へ 4. p を次の要素に進める 5 .次のポインタをゲット 6 . p < bp < next が成立した 8. bp と p->s.ptr は隣接しているので (bp + bp->s.size == next) 併合 9. free list head を今開放した要素を 指すよう動かす
22. 素朴な brk の実装 0. データセグメントには静的データとスタック が入っている 1. 現在値+増加分で (kernel 内で ) malloc 2. 新しいメモリにメモリコピー 3. 古いデータを mfree 4 スタックを末尾にメモリコピー 5. スタックと静的データの間をゼロクリア new memory data data stack stack 出典: Lions ’ Commentary on UNIX 増加分 data stack data stack data stack data stack data stack
73. 1スレッド:1 Arena の隠れた利点 SMP マシンでは、別の CPU からアクセスしたメモリは自分 CPU のキャッシュには乗らないのでラストアクセスを単純に管理してはうまくいかない しかし、ユーザ空間から自分がどの CPU で動いているのか明に意識するのは無理 (いつのまにか勝手に変わるし) そこでカーネルがもつスレッドの CPU affinity スケジューリングに着目して、自分スレッドがアクセスしたデータは自分 CPU でアクセスした確率が高いと考える スレッド専用メモリ=キャッシュヒット率がものすごく Up!