Questions tagged [capstone]

Capstone is a lightweight multi-platform, multi-architecture disassembly framework.

Overview

Capstone is a lightweight multi-platform, multi-architecture disassembly framework. It is written in C, and provided as an open-source project.
Current version is 2.1.2.

Features

  • Support multi-architectures: Arm, Arm64 (Armv8), Mips, PowerPC, Sparc, SystemZ, XCore & Intel (details).
  • Clean/simple/lightweight/intuitive architecture-neutral API.
  • Provide details on disassembled instruction
  • Provide some semantics of the disassembled instruction, such as list of implicit registers read & written.
  • Implemented in pure C language, with bindings for Python, Ruby, C#, NodeJS, Java, GO, C++, OCaml & Vala available.
  • Native support for Windows & *nix (with Mac OSX, iOS, Android, Linux, *BSD & Solaris confirmed).
  • Thread-safe by design.
  • Special support for embedding into firmware or OS kernel.
  • Distributed under the open source BSD license.

Related tags

Links

Capstone homepage
GitHub project

38 questions
1
vote
2 answers

Edge Detection Limitations

I am a computer science undergrad trying to come up with a topic for my capstone project. I am particularly interested in edge detection but I am having troubles coming up with a research area on the topic. I am looking for some kind of edge…
user5890660
  • 21
  • 1
  • 8
1
vote
1 answer

How to make capstone produce the last line of binary input?

Today I tried to start with capstone. Following their example here I wanted to start working with the library. Unfortunately capstone does not produce the last line of the asm instructions that it disassembles. It only produces an empty line.…
Heiko Becker
  • 556
  • 3
  • 16
0
votes
0 answers

Blockchain in Food Traceability System: Is it implementable as a Capstone Project?

I have a problem with a concept that I have. I want to develop a blockchain-based food traceability system as research-technology based capstone project required for our Bachelor's degree in IT. As a college student, is it implementable? I mean is…
0
votes
0 answers

Foreign key constraint cannot add

SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table products add constraint products_brand_id_foreign foreign key (brand_id) references product_brands (id) on delete cascade) This is my brands…
xshadow
  • 1
  • 1
0
votes
0 answers

Correct architecture and mode to disassemble binary with Capstone

I am using the Capstone disassembler to extract instruction sequences from PE binaries. The binaries have been compiled for different architectures. Capstone handles this with "mode" and "arch" parameters. However, if the correct mode/arch…
0
votes
0 answers

AWS Capstone project gives 502 error on dns query

I work on Cloud architecting module of AWS, In capstone project I successfully setup loadbalancer and scaling group while querying in using DNS it shows 502 error on query section while it works efficiently for cloud9 instance. Entering the…
0
votes
1 answer

Exctracting executable code from program headers

I am building a disassembler for RISC-V binaries using the capstone engine. The issue I am facing is that after checking the input file (arch, bitness, if has any program header...) I have this for loop that iterates over all program headers looking…
Josep
  • 162
  • 1
  • 9
0
votes
0 answers

How to get the value in RSP register using c++ libcapstone?

I'm trying to write a library(call mylib.so) using capstone c++ library and LD_PRELOAD to find where are the syscall instructions located in a binary(this binary contains some syscall writing in inline assembly), and what syscall are those(i.e.…
TOM ZHANG
  • 65
  • 5
0
votes
2 answers

capstone wrong regs_read/regs_write value

I'm trying to use regs_read and regs_write, but it doesn't work: $ cat cs.py import capstone Cs = capstone.Cs(capstone.CS_ARCH_X86, capstone.CS_MODE_64) Cs.detail = True CODE = b"\x48\x89\x44\x24\x10" for i in Cs.disasm(CODE,0): print(i) …
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
0
votes
1 answer

I couldn't read text section from binary using capstone library

I have a small binary which is only prints "hello", and I export .text section, using libbfd and readelf's command readelf -x .text a.out both of them gave me this output f3 0f 1e fa 31 ed 49 89 d1 5e 48 89 e2 48 83 e4 f0 50 54 4c 8d 05 66 01 00 00…
3zcs
  • 35
  • 4
  • 18
0
votes
1 answer

Does the Captone python module support an exe as input, or does the data need to be an isolated instruction binary?

Some disassemblers like IDA or Ghidra take an exe and output the instructions. Other disassemblers require the user to parse the PE header, isolate binary for the instructions and pass that in. I'm trying to learn to use the Capstone Python API, but…
J.Todd
  • 707
  • 1
  • 12
  • 34
0
votes
1 answer

capstone disassembler python returns same instructions on every offset

I am trying to disassambe a PE file using capstone with python bindings. import pefile from capstone import * exe_file = 'C:\\Users\\Philip\\file.exe' pe = pefile.PE(exe_file) # find text section offset = False for section in pe.sections: if…
woldgrep
  • 97
  • 2
  • 12
0
votes
1 answer

Finding Restaurants by Implementing Foursquare API through jQuery

I'm working on a project where I search for nearby restaurants using the Foursquare API through Fetch and jQuery but I am having trouble displaying the results. I was able to get the results through Postman but I am not sure as to why my results are…
0
votes
1 answer

Capstone doesn't disassemble past INVALID instruction

I am using capstone to disassemble a ELF binary and I noticed that when it prints out the instructions , it stops at the invalid instruction and will not continue. I noticed the stopping instruction appears to be invalid when I looked at this in…
LUser
  • 1,127
  • 4
  • 23
  • 39
0
votes
1 answer

capstone disassembler - disassembling single function without knowing length

I am interested in using the capstone disassembler library. https://github.com/aquynh/capstone My motivation for using this is that I need to be able to disassemble functions at run-time while my program runs. I have been able to integrate this…
Jon
  • 1,381
  • 3
  • 16
  • 41