Remote GDB Debugger IDA PRO - arm

I am trying to reverse engineer a binary file and try to trace the loggers but when tracing the logger addresses are always zero why?? I am using qemu and ida pro
Disassmebly Memory Organisation
enter image description here
IDA Window
enter image description here
I tried various solutions available on the internet

Related

Printing (in C) to IDE console on STM32CubeIDE

I'm starting to use CubeIDE to program a NUCLEO-F401RE board (with sensors attached) and in one of my projects I had to get the voltage of the board and print it somewhere on my laptop (connected to the board via usb cable).
I got this to work using HAL_UART_Transmit function to send the string and PuTTY, on my laptop, to receive and print the string.
Now, I noticed that there is a Console integrated in the IDE where the IDE automatically prints control information, compilation errors and such and I'd like to print the voltage (possibly using printf since I'm programming in C) here rather than using PuTTY, but it doesn't seem so straightforward (as in many other IDEs that I've used) from what I've read on the internet, for instance, here.
I get that here we have two different computers talking to each other, so printing using printf is not as easy as in other situations where code is written, compiled and executed all on the same computer.
My question is:
why isn't there a "console tab" in the IDE where the result of the printf, generated on the board, is displayed? And if there is, how to set it up? Is it simply some settings configuration in the project properties or do I have to modify the low level I/O C functions as stated in the discussion linked above?
Thank you.
Create a new Command Shell Console.
Configure the new Console just as you did with PuTTY.

Setting the fans via the ipmi tools

I have several Dell R620 that are in use. Recently, the cooling of the fans has come into question. I've yum-installed the ipmitool. An
# ipmitool sensor
shows me the information I want to know. What I don't see is the command(s) to set/reset/increase the air flow of the fans.
I don't want to power down each machine and go into the iDRAC Thermal Settings.
Does anyone know the command to set the max exhaust temperature and/or the ThermalBase Algorithm?
I don't think it's possible, ipmi is rather limited.
You can try delloem, mc or nm commands, however I didn't see proper options in my version while using Dell PowerEdge 2950.
This question better fits Server Fault, you could try there.

Serial Port Program crashes (no core dump)

im making a C project for university in Linux, its basicaly a protocol for file transfer between 2 computers. The program works fine and it sends many files without any problem, but there is 1 or 2 files i have tested and the program just crashes without any report and i just dont know how to debug the problem. Any help would be appreciated.
I also dont know if i should post the code or not, because both files (application and protocol) have over 1.5k lines of code.
In most Linux Distributions the core dumping is disable by default (which can be viewed from the system resource limit "ulimit -c" will be zero if it is disabled). To enable the same, use "ulimi -c unlimited".
To add, in Ubuntu like modern distributions, they have customized program to send the report/core file to Ubuntu developers specified in "/proc/sys/kernel/core_pattern". Make sure to change it for development purpose to debug further.
You can even try "valgrind" or "gdb live debugging" to have more clarity about the problem.

TCP/IP Programming in C

I have an exam on tomorrow on TCP/IP programming. Following is one of the previous question on this paper.
Write and run a client and a server program. Using C language in UNIX, with the
following specifications :
• A TCP client program will send a range of number (e.g. 1 to 10) to the server.
• TCP server accept the number range from client and send back the sum of the
number range. Client will print the result.
I dont know how to setup the compiler and other settings to run this tcp ip programs. When I search online, I got two different programs, one for Client and another For server. Some please tell me how can i run these programs to get desired output. What kind of compiler should I install on my system.( I am using windows 7) ??
Since the assignment requires your code to work on a Unix system, you first need to install one. Follow these simple steps to install a virtual Unix environment on top of your existing Windows installation.
Download and install VirtualBox for Windows.
Download & unpack this Ubuntu 12.10 disc image (NOTE: Requires 7-Zip).
Launch VirtualBox and create a new Virtual Machine (name it Ubuntu).
In the "Virtual Hard Disk" settings, select "Use existing hard disk" and select the image file you just downloaded (NOTE: It's filename should end in ".vdi").
Run your new Virtual Machine. You should see the Ubuntu splash screen.
Login with username ubuntu and password reverse (NOTE: Case Sensitive!).
Open up Terminal and type sudo apt-get install build-essential (NOTE: when Terminal prompts you for a password, use reverse).
You should (with hope) have everything you need for your assignment. For more information on network programming, consult Beej's Guide to Network Programming -- Using Internet Sockets.
You need to open two different terminals on your system.
In the first terminal compile and run the server.c program.(make sure either you listen to all ips or your host ip(atleast).
while this is running.(it will wait for a request from your client program)
Run the client program in the other terminal.
Hope this solves the problem!
For details on how to create and run a file in unix refer http://www.wikihow.com/Compile-a-C-Program-Using-the-GNU-Compiler-%28GCC%29
P.S: you can do the same in win7 if iam not wrong only that terminal here in called command prompt!
Post the results if possible!
Download a thing called VMWare player. And look for a Ubuntu image that you can load with the VMWare player. That way, you will have a little Linux virtual machine that you can run inside or along with Windows 7. You can use the compiler GCC in your Ubuntu or whatever other Linux virtual machine. And get lots of coffee. Blargle is correct, but I think my suggestion is a little better, because you end up having a fairly complete Unix type environment to develop in. Blargle's way put Unix tools on top of Windows, which I find to be kind of clunky.
I learnt socket programming from this site. He has given everything in detail . Download an Vmware workstation and load up ubuntu . Understand the programs they are pretty much straight forward .
Maybe you can try to look at Network Socket on the web. You can easily find a lot of good tutorial that can answer your question.
You can use the compiler you want on your system, depending on what are you using now.

How to get harddrive serial number in C or asm without wmi

how to get harddrive serial number(not the volume # wich change at each reinstall of windows) in C or asm, without wmi (cause wmi required admin right). Any clue would be helpfull cause right now i found nothing on web in C without wmi, in dayss of searching... Thank you.
EDIT : For windows system
Please try my open source tool, DiskId32, which also has the source code at http://www.winsim.com/diskid32/diskid32.html . I only have an Win32 version at this time. Maybe some day I will add a Win64 version.
Hard drive serial number and other information about the harddrive like firmware version, etc. can only be obtained using SMART as far as I know and that requires special ioctls to the the block device node (/dev/sda or /dev/sdb) which is usually not available to a regular user.
I know there is a tool called smartctl which does exactly this:
sudo smartctl -i /dev/sda
Similar tools exist (hdparm, lshw, etc.) as well.
As far as trying to figure it out this info without being a privileged user, it might be possible only if it is exposed via /proc or /sys which I highly doubt is being done in the current SATA block device drivers.

Resources