Apache httpd Security Tips

ServerSignature Off
ServerTokens Prod

Raspberry Pi Raspbian Location: /etc/apache2/conf-available/security.conf

Update regularly:

httpd -v
yum update httpd
apt-get install apache2
Advertisements

Windows & Linux & Mac Uptime

Learn run time before last boot.

Windows:

systeminfo | find "System Boot Time:"

or

Task Manager -> Performance

Linux & Mac:

uptime

Note: System boot time is wrong on Windows 10.

Solution:

  1. Press Windows key + r
  2. Type services.msc
  3. Click Windows Time
  4. Alternate click and then click Properties
  5. Change Startup type to Automatic
  6. Click Start if the service isn’t started

Delphi Elevated Application Drag & Drop

Dragging & dropping files (Explorer) to elevated application:

procedure SetDragAndDropOnSystemsWIthUAC(Wnd : HWND; IsEnabled : boolean);
type
  TChangeWindowMessageFilter = function(Msg : Cardinal; Action : Word) : Bool; stdcall;
const
  Msg_Add = 1;
  WM_COPYGLOBALDATA = $49;
var
  DllHandle : THandle;
  ChangeWindowMessageFilter : TChangeWindowMessageFilter;
begin
  DllHandle := LoadLibrary('user32.dll');
  if DllHandle > 0 then
  begin
    ChangeWindowMessageFilter := GetProcAddress(DllHandle, 'ChangeWindowMessageFilter');
    if Assigned(ChangeWindowMessageFilter) then
    begin
      DragAcceptFiles(Wnd, IsEnabled);
      ChangeWindowMessageFilter(WM_DROPFILES, Msg_Add);
      ChangeWindowMessageFilter(WM_COPYGLOBALDATA, Msg_Add);
    end;
  end;
end;