'linux'에 관한 글 3개

[Linux] Nmap 6.40

nmap 6.40

Nmap 6.40 ( http://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:
  Can pass hostnames, IP addresses, networks, etc.
  Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254
  -iL <inputfilename>: Input from list of hosts/networks
  -iR <num hosts>: Choose random targets
  --exclude <host1[,host2][,host3],...>: Exclude hosts/networks
  --excludefile <exclude_file>: Exclude list from file
HOST DISCOVERY:
  -sL: List Scan - simply list targets to scan
  -sn: Ping Scan - disable port scan
  -Pn: Treat all hosts as online -- skip host discovery
  -PS/PA/PU/PY[portlist]: TCP SYN/ACK, UDP or SCTP discovery to given ports
  -PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes
  -PO[protocol list]: IP Protocol Ping
  -n/-R: Never do DNS resolution/Always resolve [default: sometimes]
  --dns-servers <serv1[,serv2],...>: Specify custom DNS servers
  --system-dns: Use OS's DNS resolver
  --traceroute: Trace hop path to each host
SCAN TECHNIQUES:
  -sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans
  -sU: UDP Scan
  -sN/sF/sX: TCP Null, FIN, and Xmas scans
  --scanflags <flags>: Customize TCP scan flags
  -sI <zombie host[:probeport]>: Idle scan
  -sY/sZ: SCTP INIT/COOKIE-ECHO scans
  -sO: IP protocol scan
  -b <FTP relay host>: FTP bounce scan
PORT SPECIFICATION AND SCAN ORDER:
  -p <port ranges>: Only scan specified ports
    Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080,S:9
  -F: Fast mode - Scan fewer ports than the default scan
  -r: Scan ports consecutively - don't randomize
  --top-ports <number>: Scan <number> most common ports
  --port-ratio <ratio>: Scan ports more common than <ratio>
SERVICE/VERSION DETECTION:
  -sV: Probe open ports to determine service/version info
  --version-intensity <level>: Set from 0 (light) to 9 (try all probes)
  --version-light: Limit to most likely probes (intensity 2)
  --version-all: Try every single probe (intensity 9)
  --version-trace: Show detailed version scan activity (for debugging)
SCRIPT SCAN:
  -sC: equivalent to --script=default
  --script=<Lua scripts>: <Lua scripts> is a comma separated list of
           directories, script-files or script-categories
  --script-args=<n1=v1,[n2=v2,...]>: provide arguments to scripts
  --script-args-file=filename: provide NSE script args in a file
  --script-trace: Show all data sent and received
  --script-updatedb: Update the script database.
  --script-help=<Lua scripts>: Show help about scripts.
           <Lua scripts> is a comma separted list of script-files or
           script-categories.
OS DETECTION:
  -O: Enable OS detection
  --osscan-limit: Limit OS detection to promising targets
  --osscan-guess: Guess OS more aggressively
TIMING AND PERFORMANCE:
  Options which take <time> are in seconds, or append 'ms' (milliseconds),
  's' (seconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m).
  -T<0-5>: Set timing template (higher is faster)
  --min-hostgroup/max-hostgroup <size>: Parallel host scan group sizes
  --min-parallelism/max-parallelism <numprobes>: Probe parallelization
  --min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies
      probe round trip time.
  --max-retries <tries>: Caps number of port scan probe retransmissions.
  --host-timeout <time>: Give up on target after this long
  --scan-delay/--max-scan-delay <time>: Adjust delay between probes
  --min-rate <number>: Send packets no slower than <number> per second
  --max-rate <number>: Send packets no faster than <number> per second
FIREWALL/IDS EVASION AND SPOOFING:
  -f; --mtu <val>: fragment packets (optionally w/given MTU)
  -D <decoy1,decoy2[,ME],...>: Cloak a scan with decoys
  -S <IP_Address>: Spoof source address
  -e <iface>: Use specified interface
  -g/--source-port <portnum>: Use given port number
  --data-length <num>: Append random data to sent packets
  --ip-options <options>: Send packets with specified ip options
  --ttl <val>: Set IP time-to-live field
  --spoof-mac <mac address/prefix/vendor name>: Spoof your MAC address
  --badsum: Send packets with a bogus TCP/UDP/SCTP checksum
OUTPUT:
  -oN/-oX/-oS/-oG <file>: Output scan in normal, XML, s|<rIpt kIddi3,
     and Grepable format, respectively, to the given filename.
  -oA <basename>: Output in the three major formats at once
  -v: Increase verbosity level (use -vv or more for greater effect)
  -d: Increase debugging level (use -dd or more for greater effect)
  --reason: Display the reason a port is in a particular state
  --open: Only show open (or possibly open) ports
  --packet-trace: Show all packets sent and received
  --iflist: Print host interfaces and routes (for debugging)
  --log-errors: Log errors/warnings to the normal-format output file
  --append-output: Append to rather than clobber specified output files
  --resume <filename>: Resume an aborted scan
  --stylesheet <path/URL>: XSL stylesheet to transform XML output to HTML
  --webxml: Reference stylesheet from Nmap.Org for more portable XML
  --no-stylesheet: Prevent associating of XSL stylesheet w/XML output
MISC:
  -6: Enable IPv6 scanning
  -A: Enable OS detection, version detection, script scanning, and traceroute
  --datadir <dirname>: Specify custom Nmap data file location
  --send-eth/--send-ip: Send using raw ethernet frames or IP packets
  --privileged: Assume that the user is fully privileged
  --unprivileged: Assume the user lacks raw socket privileges
  -V: Print version number
  -h: Print this help summary page.
EXAMPLES:
  nmap -v -A scanme.nmap.org
  nmap -v -sn 192.168.0.0/16 10.0.0.0/8
  nmap -v -iR 10000 -Pn -p 80
SEE THE MAN PAGE (http://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLES

 

2023/12/31 18:07 2023/12/31 18:07
보람말 : , , ,

[Linux] certbot 1.11.0

certbot 1.11.0

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...

Certbot can obtain and install HTTPS/TLS/SSL certificates.  By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. The most common SUBCOMMANDS and flags are:

obtain, install, and renew certificates:
    (default) run   Obtain & install a certificate in your current webserver
    certonly        Obtain or renew a certificate, but do not install it
    renew           Renew all previously obtained certificates that are near
expiry
    enhance         Add security enhancements to your existing configuration
   -d DOMAINS       Comma-separated list of domains to obtain a certificate for

  (the certbot apache plugin is not installed)
  --standalone      Run a standalone webserver for authentication
  (the certbot nginx plugin is not installed)
  --webroot         Place files in a server's webroot folder for authentication
  --manual          Obtain certificates interactively, or using shell script
hooks

   -n               Run non-interactively
  --test-cert       Obtain a test certificate from a staging server
  --dry-run         Test "renew" or "certonly" without saving any certificates
to disk

manage certificates:
    certificates    Display information about certificates you have from Certbot
    revoke          Revoke a certificate (supply --cert-name or --cert-path)
    delete          Delete a certificate (supply --cert-name)

manage your account:
    register        Create an ACME account
    unregister      Deactivate an ACME account
    update_account  Update an ACME account
  --agree-tos       Agree to the ACME server's Subscriber Agreement
   -m EMAIL         Email address for important account notifications

More detailed help:

  -h, --help [TOPIC]    print this message, or detailed help on a topic;
                        the available TOPICS are:

   all, automation, commands, paths, security, testing, or any of the
   subcommands or plugins (certonly, renew, install, register, nginx,
   apache, standalone, webroot, etc.)
  -h all                print a detailed help page including all topics
  --version             print the version number
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2023/12/13 10:47 2023/12/13 10:47
보람말 : , , ,

[Linux] mkswap 2.23.2

mkswap 2.23.2

Usage:
 mkswap [options] device [size]
Options:
 -c, --check               check bad blocks before creating the swap area
 -f, --force               allow swap size area be larger than device
 -p, --pagesize SIZE       specify page size in bytes
 -L, --label LABEL         specify label
 -v, --swapversion NUM     specify swap-space version number
 -U, --uuid UUID           specify the uuid to use
 -V, --version             output version information and exit
 -h, --help                display this help and exit

mkswap manual (CentOS 7)

MKSWAP(8)                       System Administration                      MKSWAP(8)

NAME
       mkswap - set up a Linux swap area

SYNOPSIS
       mkswap [options] device [size]

DESCRIPTION
       mkswap sets up a Linux swap area on a device or in a file.

       The  device  argument  will  usually  be  a  disk  partition  (something like
       /dev/sdb7) but can also be a file.  The Linux kernel does not look at  parti‐
       tion  IDs,  but  many installation scripts will assume that partitions of hex
       type 82 (LINUX_SWAP) are meant to be swap partitions.  (Warning: Solaris also
       uses this type.  Be careful not to kill your Solaris partitions.)

       The  size  parameter is superfluous but retained for backwards compatibility.
       (It specifies the desired size of the swap area in 1024-byte blocks.   mkswap
       will  use  the  entire  partition or file if it is omitted.  Specifying it is
       unwise – a typo may destroy your disk.)

       After creating the swap area, you need the swapon command to start using  it.
       Usually  swap  areas  are listed in /etc/fstab so that they can be taken into
       use at boot time by a swapon -a command in some boot script.

WARNING
       The swap header does not touch the first block.  A boot loader or disk  label
       can be there, but it is not a recommended setup.  The recommended setup is to
       use a separate partition for a Linux swap area.

       mkswap, like many others mkfs-like utils, erases the first partition block to
       make any previous filesystem invisible.

       However,  mkswap  refuses  to  erase  the first block on a device with a disk
       label (SUN, BSD, ...).

OPTIONS
       -c, --check
              Check the device (if it is a block device) for bad blocks before  cre‐
              ating  the  swap  area.   If  any  bad  blocks are found, the count is
              printed.

       -f, --force
              Go ahead even if the command is stupid.  This allows the creation of a
              swap area larger than the file or partition it resides on.

              Also, without this option, mkswap will refuse to erase the first block
              on a device with a partition table.

       -L, --label label
              Specify a label for the device, to allow swapon by label.

       -p, --pagesize size
              Specify the page size (in bytes)  to  use.   This  option  is  usually
              unnecessary; mkswap reads the size from the kernel.

       -U, --uuid UUID
              Specify the UUID to use.  The default is to generate a UUID.

       -v, --swapversion 1
              Specify  the swap-space version.  (This option is currently pointless,
              as the old -v 0 option has become obsolete and now only -v 1  is  sup‐
              ported.   The  kernel  has  not  supported  v0 swap-space format since
              2.5.22 (June 2002).  The new version v1  is  supported  since  2.1.117
              (August 1998).)

       -h, --help
              Display help text and exit.

       -V, --version
              Display version information and exit.

NOTES
       The  maximum  useful  size of a swap area depends on the architecture and the
       kernel version.

       The maximum number of the pages that is possible  to  address  by  swap  area
       header  is 4294967295 (32-bit unsigned int).  The remaining space on the swap
       device is ignored.

       Presently, Linux allows 32 swap areas.  The areas in use can be seen  in  the
       file /proc/swaps

       mkswap refuses areas smaller than 10 pages.

       If  you  don't  know the page size that your machine uses, you may be able to
       look it up with "cat /proc/cpuinfo" (or you may not – the  contents  of  this
       file depend on architecture and kernel version).

       To  set up a swap file, it is necessary to create that file before initializ‐
       ing it with mkswap, e.g. using a command like

              # dd if=/dev/zero of=swapfile bs=1MiB count=$((8*1024))

       to create 8GiB swapfile.

       Please read notes from swapon(8) about the swap file use restrictions (holes,
       preallocation and copy-on-write issues).

ENVIRONMENT
       LIBBLKID_DEBUG=all
              enables libblkid debug output.

SEE ALSO
       fdisk(8), swapon(8)

AVAILABILITY
       The  mkswap  command  is part of the util-linux package and is available from
       https://www.kernel.org/pub/linux/utils/util-linux/.

util-linux                           March 2009                            MKSWAP(8)

mkswap manual (CentOS 9)

MKSWAP(8)                    System Administration                   MKSWAP(8)

NAME
mkswap - set up a Linux swap area

SYNOPSIS
mkswap [options] device [size]

DESCRIPTION
mkswap sets up a Linux swap area on a device or in a file.

The device argument will usually be a disk partition (something like
/dev/sdb7) but can also be a file. The Linux kernel does not look at
partition IDs, but many installation scripts will assume that
partitions of hex type 82 (LINUX_SWAP) are meant to be swap partitions.
(Warning: Solaris also uses this type. Be careful not to kill your
Solaris partitions.)

The size parameter is superfluous but retained for backwards
compatibility. (It specifies the desired size of the swap area in
1024-byte blocks. mkswap will use the entire partition or file if it is
omitted. Specifying it is unwise - a typo may destroy your disk.)

After creating the swap area, you need the swapon command to start
using it. Usually swap areas are listed in /etc/fstab so that they can
be taken into use at boot time by a swapon -a command in some boot
script.

WARNING
The swap header does not touch the first block. A boot loader or disk
label can be there, but it is not a recommended setup. The recommended
setup is to use a separate partition for a Linux swap area.

mkswap, like many others mkfs-like utils, erases the first partition
block to make any previous filesystem invisible.

However, mkswap refuses to erase the first block on a device with a
disk label (SUN, BSD, ...).

OPTIONS
-c, --check
Check the device (if it is a block device) for bad blocks before
creating the swap area. If any bad blocks are found, the count is
printed.

-f, --force
Go ahead even if the command is stupid. This allows the creation of
a swap area larger than the file or partition it resides on.

Also, without this option, mkswap will refuse to erase the first
block on a device with a partition table.

-L, --label label
Specify a label for the device, to allow swapon by label.

--lock[=mode]
Use exclusive BSD lock for device or file it operates. The optional
argument mode can be yes, no (or 1 and 0) or nonblock. If the mode
argument is omitted, it defaults to "yes". This option overwrites
environment variable $LOCK_BLOCK_DEVICE. The default is not to use
any lock at all, but it’s recommended to avoid collisions with
udevd or other tools.

-p, --pagesize size
Specify the page size (in bytes) to use. This option is usually
unnecessary; mkswap reads the size from the kernel.

-U, --uuid UUID
Specify the UUID to use. The default is to generate a UUID.

-v, --swapversion 1
Specify the swap-space version. (This option is currently
pointless, as the old -v 0 option has become obsolete and now only
-v 1 is supported. The kernel has not supported v0 swap-space
format since 2.5.22 (June 2002). The new version v1 is supported
since 2.1.117 (August 1998).)

--verbose
Verbose execution. With this option mkswap will output more details
about detected problems during swap area set up.

-h, --help
Display help text and exit.

-V, --version
Display version information and exit.

ENVIRONMENT
LIBBLKID_DEBUG=all
enables libblkid debug output.

LOCK_BLOCK_DEVICE=<mode>
use exclusive BSD lock. The mode is "1" or "0". See --lock for more
details.

NOTES
The maximum useful size of a swap area depends on the architecture and
the kernel version.

The maximum number of the pages that is possible to address by swap
area header is 4294967295 (32-bit unsigned int). The remaining space on
the swap device is ignored.

Presently, Linux allows 32 swap areas. The areas in use can be seen in
the file /proc/swaps.

mkswap refuses areas smaller than 10 pages.

If you don’t know the page size that your machine uses, you may be able
to look it up with cat /proc/cpuinfo (or you may not - the contents of
this file depend on architecture and kernel version).

To set up a swap file, it is necessary to create that file before
initializing it with mkswap, e.g. using a command like

# dd if=/dev/zero of=swapfile bs=1MiB count=$((8*1024))

to create 8GiB swapfile.

Please read notes from swapon(8) about the swap file use restrictions
(holes, preallocation and copy-on-write issues).

SEE ALSO
fdisk(8), swapon(8)

REPORTING BUGS
For bug reports, use the issue tracker at
https://github.com/karelzak/util-linux/issues.

AVAILABILITY
The mkswap command is part of the util-linux package which can be
downloaded from Linux Kernel Archive
<https://www.kernel.org/pub/linux/utils/util-linux/>.

util-linux 2.37.4 2022-02-14 MKSWAP(8)
2022/08/20 16:18 2022/08/20 16:18
보람말 : , ,