Software Vulnerabilities Exercise 2

【信息科学与工程学】【安全领域】第一百一十四篇 零信任网络02 生成式模型可能产生不存在的细节或误解。如何通过抽取式和生成式混合方法? 阅读详情


Software Vulnerabilities Exercise 2 - Basic buffer overffow exploits for
the receiver application
P Evans
October 31, 2024
1 Overview and Objectives
In the previous exercise you saw that by sending too much data to the networking application you can cause it
to crash or behave in an unexpected way. This session will look at how if you send a vulnerable program too
much data, but this data is carefully chosen, you can alter the commands that the program executes and change
its behaviour in a controlled way. In Exercise3 you’ll then look at how you can cause the programs to execute
arbitrary commands that the programmer never intended.
After the this exercise you should:
Know what a stack buffer overffow is and why it is dangerous
Understand how a buffer overffow can be used to force a vulnerable program to behave in ways that the
original programmer didn’t intend.
Understand how a debugger can be used to analyse a program to determine the memory locations used
to store variables and functions.
1.1 Objective 2.1: Simplify the receiver application
To analyse the buffer overffow vulnerability we dont need to include all of the networking code developed
in the last exercise.
You will create a copy of the receiver application Code::Blocks project that contains the same processMessage()
function, but without the networking code.
This is just to make the following exercises a bit easier, you will use the networked application again later.
1.2 Objective 2.2: Analyse the consequences of a buffer overffow in more detail
Last week you saw that by putting too much data in either the username or content ffelds could cause the
program to crash.
The point of this exercise is to show why the program crashes (the mechanism that actually causes the
crash)
You will need to learn how to use the debugger to do this.
1.3 Objective 2.3: Exploiting the overffow to falsify (or spoof ) the sender’s username

By sending a carefully chosen bad message, you can trick the receiving application into telling the user
that the message came from someone it didnt.
You need to understand how to create this message and why this works.
11.4 Objective 2.4: Changing the ffow of a program’s execution
The spooffng example above just illustrates how overffowing a character string can inffuence other variables
with a program.
This example (and the advanced examples on the next work sheet) show how an overffow can actually
change the behaviour of the program - in this case that is to skip over lines of code that should normally
be executed.
22 Guidance for Objective 2.1: Simplify the receiver application
To analyse the buffer overffow vulnerability we don’t need to include all of the networking code developed in
the last exercise. We will introduce this again later but its better to simplify the program for now. The ffrst
task is to create a new Code::Blocks project and enter the following code in main.c. This code is the same as
for the receiver program you looked at last week except that the message is speciffed in the code, rather than
being received through a network socket. We will go back to the networked code later, this just makes testing
easier as you don’t need to run two programs!
Create the new project and make this change to the project settings:
Right click on the project name in the project viewer (tree view to left of screen) and select Build Options.
Go to the Compiler settings tab, then Other compiler options and add the text: -fno-unwind-tables -o0.
This just simpliffes the code that the compiler generates which may help later if you disassemble the
program, the methods demonstrated should still work without these options - we are not cheating!
Now enter the following code as your program. You can download the code from Moodle if you prefer (look for
SupplementaryMaterial/oftest.c):
1 #inc lude <s t d i o . h>
2 #inc lude <s t d l i b . h>
3 #inc lude <s t r i n g . h>
4 #inc lude <windows . h>
5
6 /* Use o f g l o b a l v a r i a b l e not i d e a l but i t
7 * makes some the examples much e a s i e r ! */
8 char message [ 4 0 9 6 ] ;
9
10
11 void proc e s sMe s sage () {
12 char senderName [ 7 0 ] ;
13 char messageContent [ 1 8 0 ] ;
14
15 /* Ext ract the message */
16 s t r cpy ( senderName , message ) ;
17 s t r cpy ( messageContent , message+s t r l e n ( senderName )+1 ) ;
18
19 /* Di splay the message */
20 p r i n tf ( ”\n
===============================================================================\n”
21 ”Message from : %.69 s \n”
22 ”===============================================================================\n”
23 ”%.179 s \n”
24 ”===============================================================================\n\
n\n\n” ,
25 senderName , messageContent ) ;
26
27 r e turn ;
28 }
29
30
31 i n t readInput ( char * input ) {
32 char * inpt r , * outpt r , hex [ 3 ] ;
33
34 // read l i n e from keyboard input
35 g e t s ( input ) ;
36
37 // need to conve r t any hexadecimal cha r a c t e r codes to c h a r a c t e r s
38 // This a ll ows you to ent e r non=a s c i i c h a r a c t e r s in l a t e r e x e r c i s e s
39 hex [ 2 ] = ’ \0 ’ ;
40 in pt r = outpt r = input ;
41 whil e ( * in pt r ) {
42 i f ( * in pt r == ’ \\ ’ && *( in pt r +1) == ’ x ’ ) {
343 hex [ 0 ] = *( in pt r +2) ;
44 hex [ 1 ] = *( in pt r +3) ;
45 * outpt r++ = ( char ) s t r t o l ( hex , NULL, 16 ) ;
46 in pt r += 4 ;
47 } e l s e {
48 * outpt r++ = * in pt r++;
49 }
50 }
51
52 * outpt r = ’ \0 ’ ;
53
54 r e turn s t r l e n ( input ) ;
55 }
56
57
58 i n t main () {
59 i n t nameSize , c ont entSi z e ;
60 i n t i ;
61 i n t j = 0 ;
62
63 /* Put the username and message int o a b u ff e r to s imul a t e the data that
64 * would be r e c e i v e d in the networked a p p l i c a ti o n */
65 p r i n tf ( ”Enter username : ” ) ;
66 nameSize = readInput ( message ) ;
67 p r i n tf ( ”Enter message : ” ) ;
68 c ont entSi z e = readInput ( message+s t r l e n ( message )+1 ) ;
69
70 /* Di splay inf o rma ti on about the mes s sage */
71 p r i n tf ( ”\nUsername : %s \n” , message ) ;
72 p r i n tf ( ”Message : %s \n” , message+s t r l e n ( message )+1 ) ;
73
74 p r i n tf ( ”\nBytes : ” ) ;
75 f o r ( i = 0 ; i < nameSize + c ont entSi z e + 2 ; i++ ) {
76 p r i n tf ( ”%02x ” , ( uns igned char ) message [ i ] ) ;
77 }
78 p r i n tf ( ”\n [ username=%d char s , cont ent=%d char s ] \ n\n” , nameSize , c ont entSi z e ) ;
79
80 /* Call the pr o c e s s message func ti on same as in Exe r c i s e 1 */
81 proc e s sMe s sage ( message ) ;
82
83 /* Some a r b it r a r y commands to exe cut e a ft e r the proc e s sMe s sage func ti on
84 * ( t h i s w i l l make s ens e l a t e r ! ) */
85 j = j + 1 ;
86 j = j + 1 ;
87 j = j + 1 ;
88 p r i n tf ( ”The f i n a l value o f j i s %d\n” , j ) ;
89
90 r e turn 0 ;
91 }
Note that there are a few arbitrary commands after processMessage() is called - these will be used to illustrate
how an overffow can change the code that is executed when the program runs.
Build and run the application and if all is well, you should see the output shown in Figure 1
4Figure 1: Expected output from the simpliffed application
3 Guidance for Objective 2.2: Analyse the consequences of a buffer
overffow in more detail
Last week you saw that by putting too much data in either the username or content ffelds could cause the
program to crash. The point of this exercise is to show why the program crashes (the mechanism that actually
causes the crash) and then to show why this mechanism is actually a signiffcant cybersecurity vulnerability.
Based on what we covered in the previous lectures we can start by drawing a diagram of the stack region of
memory in the processMemory function, this is shown in Figure 2.
Figure 2: Structure of stack within processMessage()
The stack region of memory is used to store the variables that are used within the function (senderName and
processMessage). The basic principle behind a buffer overffow is that by putting too much information in one
variable you can also overwrite another variable that you are not supposed to be able to access. Since the stack
5grows downwards on most common systems, overflowing a variable allows you to modify any variable that was
created previously.
3.1 Find Offset1 using the gdb debugger
First you will confirm the value for Offset1 in Figure 2. You would expect that the memory address for senderName
should be equal to the memory address for messageContent + 180bytes but you will need to check that
this is the case as in some cases the compiler will insert padding between variables on the stack.
To do this you can use the debugger that is built into Code::Blocks. A debugger is used to analyse a program
in detail while is running and is usually used to find reasons why a program may be crashing or behaving
unexpectedly. In this case you will use the debugger in a very simple way to find the memory addresses of some
variables.
For some reason the path to the debugger executable (gdb32.exe) is not always configured in Code::Blocks.
To check/correct this, go the the Settings item in the toolbar, then choose Debugger. Click the default tab, and
look at the Executable Path option, if this is red then the debugger isn’t configured. You’ll need to select the
gdb32.exe executable at: Code::Blocks directory/MinGW/bin/gdb32.exe.
Figure 3: Configuring the debugger in Code::Blocks.
Before running the debugger you need to define a breakpoint, a breakpoint is just a specific point in the program
where the program will pause to allow you to use the debugger. In this case you want to use the debugger to
analyse the variables in the processMessage() function so you need to set a breakpoint there, we will set the
breakpoint at the end of the function so we can see what the final value of all variables is. Left click in the
margin of the Code::Blocks editor just before the return; statement in processMessage(). A red circle will appear
to show that the breakpoint has been set. Once you’ve added the breakpoint you need to run the program using
the debugger. Click the red arrow in the toolbar and the program should run but then pause at the location
you specified. See figure 4.
A yellow arrow will appear in the margin to show where the program has paused and this will also be displayed
in the debugging window, a command window should be availble at the bottom of the screen where you
can type debugging commands. See figure 5.
You now need to find the memory addresses used for the senderName and messageContent buffers. To do this
you use the examine command. Type x senderName in the debugger command window and you’ll get an output
that consists of two hexadecimal numbers:
1 > x senderName
2 0 x 2 8 f e a 0 : 0 x6c756150
The first number (0x28fea0 ) is the address stored in the string pointer and the second number (0x6c756150 ) is
the first 4 bytes of data that can be found at this address but in reverse order (0x6c = l, 0x75 = u, 0x61 =
a, 0x50 = P - see an ASCII table). You can ignore the second number for now as we’re just interested in the
6Figure 4: Setting a breakpoint in the processMessage() function and running the debugger using Code::Blocks.
address of these variables. Find the address of both senderName and messageContent and from these confirm
the value of Offset1:
(a) Address of senderName: ........
Figure 5: The debugger is now running and has paused at a breakpoint in the processMessage() function
(indicated by yellow arrow). The debugger command window is available for you to type commands.
7 (b) Address of messageContent: ........
(c) Offset1 = (a) - (b): ........
You can use the Windows calculator in programmer mode to perform calculations on hexadecimal numbers.
Note on memory address formatting: The 0xXXXXXXXX formatting string is memory address
in hexadecimal formal, prefixed by 0x, i.e. the XXXXXXXX part is a hecadecimal number
representing the memory addresses. This is a common format for displaying memory addresses
and other hexadecimal numbers in many applications.
3.2 Use Offset1 to investigate the effects of an overflow
If you computed offset 1 to be 180, you should be able to set the message content string to contain up to 179
characters without overflowing (remember that 1 character is needed for the NULL byte string terminator),
Check you are happy with your values for offset 1 though - don’t just assume it is 180!. Now
you need to find out what happens when you put too many characters in the string and run the program, it
is a good idea to prepare your strings in a text editor and paste them into the program so you don’t need to
rewrite them everytime. If you download a programming text editor like Notepad++, it will tell you how many
characters are on each line which will help you generate strings that are the correct length.
Try changing the message content string so that it is exactly (offset1-1) bytes long.The program will tell
you how long each string you’ve entered. Make the string longer by adding some characters before ”hello”
so hello remains at the end of the string.
Add 1 more padding character and rerun the program. What happens? (Look at the displayed username)
Add a few more padding characters before Hello. What happens? Why is this?
84 Guidance for Objective 2.3: Exploiting the overflow to falsify (or
spoof ) the sender’s username
Hopefully you have seen how putting too much data in a buffer can overflow that buffer and cause other variables
that are stored nearby to be modified. This can allow an attacker to modify variables within a program that
they shouldn’t be able to, in this case it allows someone to change the contents of the senderName buffer by
sending a message whose content exceeds the length of the messageContent buffer.
You now need to demonstrate how this overflowing technique could be dangerous. The idea is to trick the
processMessage function into displaying an incorrect username for the message sender.
Enter the username and content messages as something like:
1 Enter username : A Hacker
2 Enter message : H ell o
If you run your program the output should be:
1 ===============================================================================
2 Message from : A Hacker
3 ===============================================================================
4 H ell o
5 ===============================================================================
You need to add some additional information to the message content string so that it overflows the messageContent
buffer and overwrites the senderName buffer in processMessage(). The idea is to overwrite the real
username ”A Hacker” with something else. The overflow padding you use should be transparent to the user
when printed to screen by the processMessage() function.
Once you’ve worked out what the message content should be, try it out on your sender/receiver applications.
Open the sender application and enter your username as ”A Hacker” and then try to send a message that
appears to come from another username. Develop the correct string using the application from this exercise,
then test on the networked application from last week.
You should be able to reproduce the results in figure 6. Make a note of the username and message strings
that you used.
9Figure 6: Spoofed username in sender & receiver applications using a buffer overflow. Despite the username
specified in the sender program being ”A Hacker”, the second message appears to come from a user called
”Paul”
105 Guidance for Objective 2.4: Changing the flow of a program’s
execution
The spoofing example above just illustrates how overflowing a character string can influence other variables
with a program. In many real cyber attacks the overflow technique is actually used in a different and more
dangerous way.
5.1 The theory
As discussed in the previous lectures, the processor relies on one of its registers (EIP for a 32bit application) to
tell it where to find the next instruction to execute. When the processor encounters a function call, it has two
possible values for EIP:
The address of the next instruction if the processor enters the function.
The address of the next instruction if the processor does not enter the function.
Take the lab2 example program:
1 /* ** ======================= E x t r ac t from main ( ) ======================= ** */
2 p r o c e s sM e s s a g e ( message ) ;
3
4 j = j + 1 ;
5 j = j + 1 ;
6 j = j + 1 ;
7 /* ** ====================== /E x t r ac t from main ( ) ======================= ** */
1 /* ** ================== E x t r ac t from p r o c e s sM e s s a g e ( ) ================== ** */
2 v oid p r o c e s sM e s s a g e ( c o n s t ch a r * message ) {
3 ch a r senderName [ 7 0 ] ;
4 ch a r messageContent [ 1 8 0 ] ;
5
6 s t r c p y ( senderName , message ) ;
7 s t r c p y ( messageContent , message+s t r l e n ( senderName )+1 ) ;
8 .
9 .
10 .
11 r e t u r n ;
12 /* ** ================= /E x t r ac t from p r o c e s sM e s s a g e ( ) ================== ** */
When the processor reaches the line processMessage( message ), the flow of execution must transfer into the
processMessage() function. This means that the EIP register will be set to the address of the first instruction in
processMessage() - somewhere just before strcpy( senderName, message ). Had this jump into processMessage()
not occured, the next instruction would have been j = j + 1 in main().
Before the processor jumps into processMessage(), it needs to remember where it would have gone if the function
call hadn’t happened - because this is where it needs to go back to when processMessage() returns. It does this
by saving the alternative EIP value onto the stack so that it can be reloaded when processMessage returns.
In addition to saving the return EIP value onto the stack, one more variable is saved. This is the content
of another register called EBP, this register tells the processor where in the stack it can find the variables belonging
to the current function. When the processor enters processMessage(), EBP changes to the address where
processMessage()’s variables (senderName, messageContent) are located. When the function returns back to
main(), EBP must be changed back to point to the location where main()’s variables are located (username,
content, messageSize, i, j). The old EBP value is therefore also saved to the stack so that it can be restored
when processMessage() returns.
Important: The key point to understand is that when the processMessage() is running, there are two variables
stored on the stack just above senderName and messageContent. These two variables describe how to get back
to main() from processMessage(): one tells the processor where the next instruction in main() is, and one tells it
where to find main()’s variables again. If you overflow senderName or messageContent and overwrite either the
saved EBP or EIP variables, the program will most likely crash when it tries to return from processMessage()
11because you will have corrupted the information that the processor needs to succesfully return to main(). The
clever bit is that if you overflow senderName or messageContent and overwrite the saved EIP with a carefully
chosen value, you can actually take control of the program. Now, when processMessage() returns, it no longer
jumps back to ‘j = j + 1;‘, it can jump to any bit of code you want it to.
Advanced Suggestion You can see the contents of the processor’s registers when you pause the program
using the GDB debugger. To do this type info registers (or i r for short) in the debugger command window.
5.2 Determine Offset2 and Offset3
The first thing you need to know is where the saved EBP and EIP are in relation to a known memory address.
If the saved EBP is corrupted the program will crash so the easiest way to find Offset2 is to keep making the
username string longer, 4 bytes at a time, until the program crashes and then look at the length of the string.
Figure 7: Structure of stack within processMessage() - Offset2 is the number of bytes from the start of the
username buffer to the location where EBP is saved. Offset3 is the number of bytes from the start of the
username buffer to the location where EIP is saved and since EBP is a 32bit number, Offset3 = Offset2+4
bytes.
Start with a username string (in main()) that is 69 characters long, this will completely fill the senderName
buffer (including the NULL string terminator, the string is actually 70 bytes long). Make sure the content string
is less than 179 characters long so it doesn’t overflow and cause problems.
Construct your string in a text editor then paste them in to the program so that you can easily add a few
characters at a time, your strings will look something like:
1 |================ 59 Bytes =============|4B=|4B=|4B=| |
2 ˆ=NULL t e rmi n a t o r .
3 Username : xxxxxxxxxx . . . . . . . . . . . . . . . . . . . . . . . . xxxxxxxxAAAABBBB
4 Message : H ell o
Keep adding 4 characters at a time to the username string and re-run the program. When you overwrite
the saved EBP the program will crash.
When the program crashes, compute Offset2. If the program didnt crash last time, but crashed when you
added another 4 bytes your string is now offset2+4 bytes long (including the NULL character)
12 Any 32bit value (such as the saved EBP) is 4 bytes long, therefore Offset3 = Offset2 + 4.
Note: With Code::Blocks and Windows 10, it is not always obvious that the program has crashed. You need
to pay attention to the output from the program, normally you will see something like:
1 P r o c e s s r e t u r n e d 0 ( 0 x0 ) e x e c u ti o n time : 0. 0 1 4 s
2 P r e s s any key t o c o n ti n u e .
If the program crashes, the process will return an error code:
1 P r o c e s s r e t u r n e d =1073741819 ( 0 xC0000005 ) e x e c u ti o n time : 1. 5 3 6 s
2 P r e s s any key t o c o n ti n u e .
5.3 Manually changing the saved EIP value
Now you know Offset3 you are able to modify the saved EIP and change the execution of the program when
processMessage returns. To start with you will do this by adding a line of code in the program that will allow
you to overwrite the saved EIP with a value of your choosing. This isn’t a viable way of exploiting the program
(an attacker wouldnt normally be able to modify and recompile a target program) but it does easily allow you
to understand how changing the saved EIP can affect the program. The EIP value saved on the stack can
be accessed using the following code somewhere in processMessage():
1 * ( ( un si gned i n t *) (&senderName [ 0 ] + O f f s e t 3 ) )
This just says ”I want to access the number located at the memory address ’&senderName[0] + Offset3’ bytes.”.
Obviously you need to substitute in your value for offset3!
5.4 How does changing the saved EIP modify the program’s behaviour?
If you increase the saved EIP, you should be able modify what happens when the program returns from processMessage().
 Normally it would return to the first instruction after the call to processMessage() in main()
(the first j = j+1). If you increase the saved EIP value slightly, processMessage will return to main at a slightly
different point. Notice that there are three j = j + 1 instructions after the call of processMessage(). How much
do you need to increase the saved EIP by to cause the program to skip over one or more of these instructions?
Use:
1 * ( ( un si gned i n t *) (&senderName [ 0 ] + O f f s e t 3 ) ) += 1 ;
to increase the saved EIP by 1 byte, use:
1 * ( ( un si gned i n t *) (&senderName [ 0 ] + O f f s e t 3 ) ) += 2 ;
to increase the saved EIP by 2 bytes etc. You’ll need to increase EIP 1 byte at a time until you manage to
cleanly jump over a j = j + 1 instruction, when you do this the final output of the program will change from:
1 The f i n a l v al u e o f j i s 3
to:
1 The f i n a l v al u e o f j i s 2
The program will crash if you only partially jump over an instruction.
How many bytes do you need to increase the saved EIP by to skip over 1 j = j + 1 instruction?
How many bytes do you need to increase the saved EIP by to skip over 2 j = j + 1 instructions?
How many bytes of memory does a j = j + 1 instruction take up?
Add other, different instructions at the end of main and compute the number of bytes required to jump
them if you want.

反激开关电源设计全解析:从CCM/DCM原理到PCB布局实战 开关电源作为现代电子设备的能量转换核心,其核心原理是通过高频开关动作实现高效的电能变换。反激拓扑因其结构简单、成本低廉且易于实现电气隔离,成为小功率离线式电源的主流选择。其技术价值在于通过变压器耦合实现能量存储与传递,解决了安全隔离与多路输出等关键需求,广泛应用于充电器、适配器及家电供电等场景。本文聚焦反激电路,深入剖析其CCM与DCM两种工作模式的原理差异及选型考量,并结合伏秒平衡定律与RCD钳位等热词,详解从变压器计算到MOSFET选型的完整工程设计流程。 阅读详情

相关推荐

VOSviewer文献可视化006:修改节点标签文字

由VOSviewer软件生成的可视化图形所显示的文字是小写的,有时候,我们希望其所显示的数据(如国家或作者的首字母等)能够以大写的方式呈现,这时可以进行对节点标签文字的修改操作,使图形显示我们想要的一个效果。

qq_41725964的博客 6153

the economic & techcrunch

经济学人和techcrunch

Coral_a的博客 532

Linux-RGMII PHY 88E1512 驱动调试记录

1. 简介 1)开发板平台:创龙 AM5728 (tl5728-easy-evm) 2)PHY芯片:Marvell 88E1512 88E1512和88E1510都是一个系列的phy,采用marvell的通用phy驱动,驱动源码路径如下:drivers/net/phy/marvell.c 2. 应用场景 1)系统框图 AM5728连接两个PHY,PHY0的工作模式是 RGMII to Copper (RGMII到电口),PHY1的工作模式是 RGMII to SGMII。 两个PHY与处理器的连接方式都是

weixin_40407893的博客 2万+

VMware 安装 SQL Server 双节点 AlwaysOn 可用性组教程 —— WSFC、AG 与侦听器完整部署(系列核心篇)

13_VMware 安装 SQL Server 双节点 AlwaysOn 可用性组教程 —— WSFC、AG 与侦听器完整部署(系列核心篇) 系列定位 :《SQL Server 数据库全栈运维实战系列》第 13 篇,与《MySQL 数据库全栈运维实战系列》同构对标(对标 MySQL 13 主从与 I…

dk843108982的博客 261

Starlink卫星动力学系统仿真建模前传1-时空系统介绍

对于在轨道上运动的航天器由于速度接近第一宇宙速度,为了获取准确的位置信息对时间的精度要求极高,为了准确描述航天器的运动规律,本节对卫星仿真建模中用到的各种时间系统进行介绍。卫星轨道平面为坐标平面,坐标原点位于卫星系统质心,轴由卫星系统质心指向地心(当地垂线),轴在轨道面内垂直于轴并指向卫星的前进方向,轴同、轴构成右手系,指向轨道面负法线方向。不同坐标系下的建立的运动形式与复杂程度不同,会直接影响运动方程的求解繁简程度,因此,选取适当的坐标系具有重要的意义。定义星体坐标系,该坐标系简记为系,与卫星本体固连。

xspace的博客 1442

Transformer-Based Attention Networks for Continuous Pixel-Wise Prediction 基于Transformer注意力网络连续像素级与估计

Transformer-Based Attention Networks for Continuous Pixel-Wise Prediction 基于Transformer注意力网络的连续的像素级的

MengYa_Dream的博客 4717

数据库优化不是只加索引:从 SQL、表结构到写入链路的完整取舍

上线之后,有的查询确实变快,但一段时间之后,写入接口越来越卡、有些 SQL 依旧不走索引、高峰时段锁等待堆积。同时,这条查询只需要 id、order_no、amount,还没有形成覆盖索引,依旧会回表。更新语句的过滤条件,必须能够命中索引,锁定尽可能少的行。有时候 SQL 明明有索引,explain 却看到优化器选择全表扫描,不是索引失效,是 MySQL 统计信息不准,优化器误判扫描行数。如果只有三个单列索引,MySQL 优化器只会选择其中一个索引,剩下的条件需要回表过滤,还需要文件排序,效率很低。

acd12009的博客 144

浙政钉H5应用上架实战:从环境配置到发布避坑指南

本文详细解析浙政钉H5应用上架全流程,从环境配置到发布避坑指南。重点介绍Vue 2.6 + Node 14.21.3的稳定开发环境搭建、项目结构规范及常见报错解决方案,帮助开发者高效完成浙政钉H5应用上架流程。

weixin_27943395的博客 288

嵌入式数据库横向对比:HSQLDB · Derby · DuckDB · SQLite · H2 · SQLTiny

SQLTiny 是用 C++20 从零实现的轻量嵌入式数据库,核心定位为支持 MySQL Wire Protocol 的多语言、可网络访问的嵌入式数据库。区别于 SQLite(文件锁)、DuckDB(列式分析)、HSQLDB/H2(私有协议),它以极简代码量(~15k LOC)和标准协议兼容,填补了“嵌入式 + 多语言直连 + TCP server”空白。虽当前性能受限于全局锁与无索引 JOIN,但其清晰架构与生态兼容性使其成为教学、原型开发及多语言项目中理想的 MySQL 替代品。

Life is not divided 273

g2o&PCL 四阶多项式拟合

g2o&PCL 四阶多项式拟合

dayuhaitang1的博客 143

基于STM32L4XX 、HAL库的ATD5984步进电机驱动器驱动程序应用设计

一、简介: ATD5984是一款内部集成了译码器的微特步进电机 驱动器,能使双极步进电机以全、半、1/4、/1/8、1/16 和1/32步进模式工作。步进模式由逻辑输入管脚MSx选 择。其输出驱动能力达到28V±1.6A。 译码器是ATD5984易于使用的关键,通过STEP管脚 输入一个脉冲就可以使电机完成一次步进,省去了相序 表,高频控制线及复杂的编程接口,使其更适于没有复 杂的微处理器或微处理器负担过重的场合。 在步进操作期间,ATD5984的内部电路可以自动

PP_Cottage的博客 410

记一次Sql Server2012免费版如何升级到2016企业版本

本文记录了将SQL Server 2012免费版升级至企业版的完整流程,重点解决因版本限制导致无法使用代理功能的问题。通过加载ISO安装包,选择从旧版本升级,完成功能安装与实例配置后,需手动启用“代理XP”并检查服务状态。若代理仍异常,需通过安装程序添加“SQL Server代理”组件,最终实现企业版功能完整启用。

qq_57492774的博客 215

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

SQL Server 基础语法详解:从建库建表到约束与增删改查

本文以学生信息表 Students 为主线,系统讲解数据库基础语法,涵盖建库、建表、约束添加及增删改查操作。通过 SQL Server T-SQL 示例,清晰区分数据库、表结构与记录的操作对象,强调字段类型、非空、自增、主键、唯一、检查与默认约束的定义与应用,帮助读者理清各语句间的逻辑关系,掌握数据库管理的核心技能。

2601_96519735的博客 1589

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

PostgreSQL 日报| OAuth 校验库置空仍可登录(11 月 9 日)

Tomas Vondra 提交了针对 commit a798660ebe3 中"bogus parameterizations"漏洞的清理版修复补丁,并为各个回退分支分别提供了对应的版本。据报道,OpenAI 正在进行新一轮融资,已额外筹集 110 亿美元,整轮融资尚未正式收官,预计将在未来数周内完成。作为一款面向现代开发流程的 Serverless Postgres 数据库,Lakebase 支持即时分支与环境克隆,并通过计算与存储分离的架构提升性能、降低成本、增强可靠性。函数中发现了一个 bug。

IvorySQL的博客 245

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

#SQLite 数据库笔记一:(概念 / 终端指令 / SQL 语句 / C 编程 / 回调函数)

数据库 = 数据的仓库,假设数据是海量。能力说明存储数据持久化保存,程序退出数据还在统计数据、分组、排序数据管理增、删、改、查(CRUD)嵌入式设备上也会用数据库(单片机网关、路由器、工业 HMI 都常见),因为 sqlite 体积小、无需服务进程、单文件即可。数据库 = 库 > 表 > 记录(行) > 字段(列)sqlite3 = 开源、C 写的、单文件、免安装、最多 2T 的嵌入式关系型数据库。

lwq20051110的博客 260

2026最新PostgreSQL到Doris数据同步完整教程:全流程图形化配置无需写ETL

本文演示通过NineData控制台将PostgreSQL数据实时同步至Apache Doris的完整流程,涵盖结构、全量、增量三阶段复制。全程图形化操作,无需编写脚本,支持键列与分布键可视化映射、复制规格预检查、数据对比校验及延迟告警。适用于构建稳定高效的实时分析数仓,助力报表与大屏查询基于最新数据。

云原生智能数据管理平台 216

1-10 PostgreSQL中多表连接全解:inner/left/right/full/cross join

本文基于 PostgreSQL 15+ 完整拆解 5 种主流连接:内连接、左连接、右连接、全连接、笛卡尔连接。结合可落地的测试数据,演示每种连接的执行逻辑、返回结果,重点剖析 NULL 值对 JOIN 匹配的核心影响,彻底解决多表连接数据丢失、匹配异常、结果错乱的问题。

zhangjw34的专栏 145

DeepSeek总结的 PostgreSQL 18.7、17.12、16.16、15.20、14.25 及 19 RC 2 发布说明

发布于 2026-11-12,由 PostgreSQL 全球开发组发布PostgreSQL 项目 安全PostgreSQL 全球开发组已发布所有受支持版本的更新,包括 18.7、17.12、16.16、15.20 和 14.25,以及 PostgreSQL 19 的第二个发布候选版本。本次发布修复了 52 个安全漏洞和过去几个月报告的 140 多个 bug。有若干问题可能需要你在更新后采取额外步骤,下文有详细说明。请参阅"更新"一节,了解更新后可能需要执行的步骤。完整变更列表请查阅发布说明。

l1t的专栏 266

网站的SQL 注入:从攻击原理到防御措施

SQL 注入(SQL Injection)是 Web 应用中最古老、危害最大的安全漏洞之一。简单来说就是攻击者通过在用户输入中注入了恶意的SQL 代码,让数据库执行非正常的操作,从而能窃取数据、篡改内容甚至控制整个服务器。SQL 注入虽然古老,但至今仍是 Web 安全的头号威胁。永远不要把用户输入直接拼进 SQL 语句。首选:使用 PDO/MySQLi 预处理语句 + 关闭模拟预处理配合:输入类型校验与格式验证加固:数据库最小权限 + 关闭错误回显外围:WAF + 定期安全扫描。

2501_94567985的博客 604

01_SQLServer 体系架构全解 —— 实例进程、关系引擎、SQLOS 与事务日志深入

01_SQLServer 体系架构全解 —— 实例进程、关系引擎、SQLOS 与事务日志深入 系列定位 :《SQL Server 数据库全栈运维实战系列》第 01 篇,与《MySQL 数据库全栈运维实战系列》同构对标(对标 MySQL 01 对应篇目)。 适用版本 :SQL Server 2019/…

dk843108982的博客 1050

SQL Server 增删改查与约束全解:INSERT/UPDATE/DELETE、LIKE 模糊查询、主外键约束

看着简单,但delete和truncate的区别、where漏写、null判断、like通配符、约束命名,每一处都能让新手卡半天。文末给出 WinForm 连接 SQL Server 的完整写法。

2501_94699871的博客 204

快捷键与热键有何异同?

本文对比了热键与快捷键在“粘贴”操作中的异同:用户层面,热键需按Alt+字母组合,快捷键则直接Ctrl+V;开发者层面,修改热键仅需调整菜单标题,而修改快捷键需编辑资源文件中的加速器设置。文章强调专业分工的重要性,并推荐相关排样优化与工具箱技术博文。

闻缺陷则喜何志丹 1778

多数据库开发和管理工具 SQLark,支持达梦/Oceanbase/TiDB/Oracle/MySQL/PG 数据库!

工具选型这个事,没有绝对的优劣,适合自己的工作流最重要。如果你也在用 OceanBase,可以试试 SQLark,至少在连接配置这个环节,确实要省心不少。

零俗 212

PG18 索引与查询特性在 IvorySQL5.6 上的实测

这一篇测 IvorySQL 5.6(PG18) 在索引与查询侧的三组新能力:nbtree 的 skip scan、GIN 索引的并行构建、以及控制文件复制方式的。

IvorySQL的博客 258

SQLServer 索引与 SQL 优化 —— 聚集索引、非聚集索引、覆盖索引、碎片维护与执行计划

11_SQLServer 索引与 SQL 优化 —— 聚集索引、非聚集索引、覆盖索引、碎片维护与执行计划 系列定位 :《SQL Server 数据库全栈运维实战系列》第 11 篇,与《MySQL 数据库全栈运维实战系列》同构对标(对标 MySQL 11 对应篇目)。 适用版本 :SQL Server…

dk843108982的博客 209

PostgreSQL 日报|CloudNativePG 晋级 CNCF 孵化(11 月 11 日)

他分享了穿着该套装的亲身体验:热量难以散发、视野极为有限,还需要另一名志愿者全程引导,不过 2026 年的新款套装已内置电池风扇,改善了通风条件。值得关注的是,七位联合创始人计划各自出售相同数量的股份,按发行价中位数计算,每人将套现约 2.5 亿美元,同时整个创始团队仍将保持对公司的控制权。在会议进行过程中,Claude 可以同步起草讨论中的方案、在白板上梳理时间线、在会议聊天框中回答问题,并从关联的工作应用中调取相关信息(如往年数据)。Neon 发布了一篇文章,汇总了近期对其后端基础设施的多项更新。

IvorySQL的博客 100
上一篇: 6CCS3AIN Pacman MDP Solver
下一篇: CE235 Transposition Cipher
wx____codinghelp
博客等级 码龄2年 771粉丝 115原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值