Академический Документы
Профессиональный Документы
Культура Документы
������ ����������� �� ��� DLL, ������ ����� �������� � ����� ������������ ��������.
�� 64 ������ ������� ����� 64-������ ������, � �� 32 ������ ������� 32-������
������.
������ � ��� �� ������ ��������� �� �++. � ����� ���� ��������� ���������� � ���� �
����������, � ������� �� ��������:
1. ����� �������������� ������������� Visual C++ Runtime. ������� malloc, memcpy,
str* - ������� ��������. � WinAPI ��� ���� ��� ����������� � ������ malloc �
HeapAlloc, ������ memcpy � CopyMemory, ������ strstr � StrStr (shlwapi.h/.lib).
1.1. STL � ����� ������ ������� ��������. ����� �� �������� std::mutex. ��������� -
�� ��� ����� � ����!
1.2. ��������� ���� STL ��� �������������� ������ � ����. �� std::mutex �� �����
200�. ��� �� ����� � ����� ����, � �� ����, � ����� ����� ��� ������� � ���������
���������!
1.3. ����������� ������� 1 � 1.1 ����� ���� �������� ����� ��������� ��������.
2. �������� �������� � ��������� ��������� � ����� ������ ���� ����������� (����
/MT).
3. ���� ���������� ��������� ����������, ��� ������ �������� ������� �������
��������� ����� malloc/realloc/free (������ ��� �� ���� ��������� ���� ������� ���
VirtualAlloc). ����� ��� � ���� ������ ���� ���������� ���������� �� ����
����������� (����� �� ���� ������� ��������� ����-�� dll-��, ������� �� ��������
���� � Windows).
4. ������ ����� �������� ��� �� ����� �������� �������������� �����������, ��� � ��
����� ��������� ������� (nt authority\SYSTEM), ��� ��������������� ������� (���
������). �� ������ �����������������, ������� Session 0 isolation/Services
isolation in session 0.
5. ��� ����� �� ������ ������� �������� ���� � ������ ����, ��� � �������� �������
�� ����� ���������� � ����� ��� ��������� �� ����.
����������� ����� ��� ���������, � ���������� ������ ����� �� ���� �������.
������������� ��� �������� ���� ������� ������ ������ �������� ����, ��� � ���
�������� ������ ��������, � � production � ���.
�����, ���� �������������� ���������, �������� � ������������:
1. ��������� ������������� ��������� ������. �� �������� ��������� ������ � ����
����� � ������. ������ ������ ����� ������ ������ ������������.
2. ������ �� ����������� �� ������ �������� ��������� (�.�., ����� ��� �� �����
���� �������� ���-���� � ������/���� ��� ���������, � ����� ������ ������ ���
�������).
3. ���� ������ �������� � ���������� ���������, ��������� ������ ������������ �����
���� (�� ������� � ������ ��� ��������� ����� ���������):
a. ����� ������/������ ����� (ReadProcessMemory/WriteProcessMemory)
b. Named pipes
���������� ������
1. ������ ������ ������ Microsoft Visual Studio ������ �� ���� 2015.
2. ������ Visual Studio ������ ���� �������� �������� �������:
* �� ���� �������� ������:
- �������� �������: $(SolutionDir)Bin\$(PlatformTarget)\$(Configuration)\
- ������������� �������: $(SolutionDir)\obj\$(Platform)\$(Configuration)\$
(ProjectName)\
- ���������������� ��������: ��
* ������� Release:
- ������ ���������� ���������� (�/�++ �������� ����): ���
- ��������� ��������� ��������� (�����������/�������): ���
3. ������ ������������� ����������� Andrivet (���������, ��.������ _STR())
4. ��������� ������ ������������� ����������� GetApi.h. ���� ������������,
��������� ���������� ����� ������ ������.
5. ������ ������ ����� ��� ������ - x32- � x64-�������.
6. � ������ ������ ������ ���� ������������� �� ��������� ������, ������� ��������
���������� �����.
7. ������ ������ ����� ��������� �����. ���������� ����� ������ ��������� �
c:/temp/modulename.log (���� � ���� ������������ � �������).
����� ������ ���� ������ ��������� �������� ����� � �������� �� �������.
8. � ������� ������ ���� ���� �������� config.h (�������� �������, ����� ���� -
����� ��� ���������� ��������� - ����, �������-������������ �������� ���������
���).
9. ������ ������ �������� �� ���� ����������� ������ Windows.
���������� ������������� ����� Windows - Windows XP (���� ���������� - Windows
Vista).
10. ������������� � ���������� ������ ��������� ���� notelemetry.obj
(https://stackoverflow.com/questions/37761768/how-to-prevent-visual-studio-2015-
update-2-to-add-telemetry-main-invoke-trigger)
������������ ������
modulename/Release_logged/x86
modulename/Release_logged/x64
modulename/Release_nologs/x86
modulename/Release_nologs/x64
� Release_logged ���� ����� � ����� � ��� ���������� (�� ��� ��� ����� �������
������ Release!
�.�. ��� ������ ���� ������� ��� �����������, �������� ���������� ������� ���).
� release_nologs - ����� ��� ����, � ������ �����������.
� ����� �������� �� ������� ������ ���� �� ����� � ���� (��������
cookies.22.04.2019).
���� �� �������� ���� ���� ��������� ������ ������ �����, ������ ���������
���������� ������� (�������� cookies.22.04.2019.2)
������������ ������
API ������
������ ������������ �������� �������: Start, Control, Release, FreeBuffer [*1]
��� ������� ���� �������� ������ stdcall � ������������ �� ������.
������ Start ����� �������� ��������:
PVOID Start(
LPCSTR ModuleName,
LPCBYTE Arg,
SIZE_T ArgLen,
LPSTR ResultInfo,
const ParentInfo* pParentData,
PVOID EventCallback,
PVOID EventCallbackContext,
PVOID Reserved1);
������ ��������� ��� ������� ����� ���������� �������.
ModuleName - �� �����
Arg - �������� ������� start
ArgLen - ������ �������� CtlArg � ������
ResultInfo -����� �� ������������� ������ ctl. ����� ����� ������������ ����� 1024
�����
pParentData - ��������� � ���������� ������, ��������� �������� �����
EventCallback � ��������� �� ������ ���������� (��.����)
EventCallbackContext � �������� ���������� (��.����)
������ � ������ ����� ���������� ���������, ������� ���������� ������������ ���
������ ������� Control � Release (����� ���������� ����� ����� ������� Start � ��
���������� �������� � �������� ��). � ������ ������� ������ ���������� ����.
���:
ModuleHandle - ���������� ����� (������ ��� ��������� �� ������ Start)
EventName - ��� ������
EventInfo - ���������� ������
pOutData - �������������� ������ ������
OutDataSize - ����� ���.������
pOutDataTag - ��� ������
Context - �������� ��� EventCallbackContext, ���������� � Start
!!!!!!!!!!!
!!!�����!!!
!!!!!!!!!!!
������� �� ����� ������ ���� ���� � ��� ������ ���� �������. ����������� �������
��������.
�.�. �� ������ �� ������� ���������� � ������ �����������, �� ����� ��� ������
������, �� ����� ���������� ������ ������.
�������� ������